473,795 Members | 2,875 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

events and image


Hi group,

Long story short, I'm new to JavaScript and have started it less than 3
weeks. My question is

1) how can I create a situation that when user clicks on gif or ...
image file an event get triggered?

what I have done is:

Testing image:
<a href="" name="linkImg1"
onclick="javasc ript:my_trker(' http://www.mywebsite.c om/akohan');" >
<img name=img1 src="flower.gif " border=0 >
</a>

the problem is that when I click on this image it goes thru the
function but then the page changes to the path:
http://www.mywebsite.com/akohan and shows a list or directory of the
files I have there!
2) Is it possible to create new events in Javascript? lf so, how can I
monitor an event when user does a right-click on a link or image?

Your help will be appreicated.

amit.

Jun 29 '06
19 1507
amit said the following on 7/5/2006 12:53 PM:
Hi Randy,

I appreciate your patience and reading all my statements one by one and
answering them!
Then I would appreciate you reading mine :)

Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
1) As you saw, I was using an image object to send those tokens or
information! Is there any better way (something that makes sense) ?
Makes sense, and no, there is not a "better" way as the way you are
using is the most widely supported way to do it.
2) I'm coming from C/C++ programming background and I think there
should be ways to do javascript programming base on OO techniques.
Right?
If you are doing OO programming, then yes.
if so, do you know any link?
3) I'm sure you have heard of AJAX. Do you recommend it to learn?
For the future, yes. It is the basis for what is being called "Web 2.0"

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 6 '06 #11

Randy Webb wrote:
amit said the following on 7/5/2006 12:53 PM:
Hi Randy,

I appreciate your patience and reading all my statements one by one and
answering them!

Then I would appreciate you reading mine :)

Answer:It destroys the order of the conversation
Question: Why?
Answer: Top-Posting.
Question: Whats the most annoying thing on Usenet?
1) As you saw, I was using an image object to send those tokens or
information! Is there any better way (something that makes sense) ?

Makes sense, and no, there is not a "better" way as the way you are
using is the most widely supported way to do it.
2) I'm coming from C/C++ programming background and I think there
should be ways to do javascript programming base on OO techniques.
Right?

If you are doing OO programming, then yes.
if so, do you know any link?
3) I'm sure you have heard of AJAX. Do you recommend it to learn?

For the future, yes. It is the basis for what is being called "Web 2.0"

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Hello Randy,

Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.

My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?

Your help is appreciated.

Thanks,
Amit

Jul 6 '06 #12
amit said the following on 7/6/2006 12:48 PM:
Hello Randy,

Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.

My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?
What do you mean by "track information on FLASH elements"?

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 6 '06 #13

Randy Webb wrote:
amit said the following on 7/6/2006 12:48 PM:
Hello Randy,

Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.

My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?

What do you mean by "track information on FLASH elements"?

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Hi again,

What I meant is tracking anytype of events on assets related to Flash.
I think if you look at
http://www.google.com/support/analyt...243&topic=7292
will give a better view.

Thanks in advance.
Amit

Jul 10 '06 #14
amit said the following on 7/10/2006 12:44 PM:
Randy Webb wrote:
>amit said the following on 7/6/2006 12:48 PM:
>>Hello Randy,

Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.

My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?
What do you mean by "track information on FLASH elements"?
Please don't quote signatures.
Hi again,

What I meant is tracking anytype of events on assets related to Flash.
Flash has to do that.
I think if you look at
http://www.google.com/support/analyt...243&topic=7292
will give a better view.
The Flash app has to make the call to the JS script that will then
"track" the Flash app. Trying to do it in JS alone won't work.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 10 '06 #15

Randy Webb wrote:
amit said the following on 7/10/2006 12:44 PM:
Randy Webb wrote:
amit said the following on 7/6/2006 12:48 PM:

Hello Randy,

Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.

My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?
What do you mean by "track information on FLASH elements"?

Please don't quote signatures.
Hi again,

What I meant is tracking anytype of events on assets related to Flash.

Flash has to do that.
I think if you look at
http://www.google.com/support/analyt...243&topic=7292
will give a better view.

The Flash app has to make the call to the JS script that will then
"track" the Flash app. Trying to do it in JS alone won't work.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


Do you mean this is possible only if a Flash designer call my function
in his Flash code when he creates them?

Jul 10 '06 #16
amit said the following on 7/10/2006 2:09 PM:
Randy Webb wrote:
>amit said the following on 7/10/2006 12:44 PM:
>>Randy Webb wrote:
amit said the following on 7/6/2006 12:48 PM:

Hello Randy,
>
Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.
>
My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?
What do you mean by "track information on FLASH elements"?
Please don't quote signatures.
>>Hi again,

What I meant is tracking anytype of events on assets related to Flash.
Flash has to do that.
>>I think if you look at
http://www.google.com/support/analyt...243&topic=7292
will give a better view.
The Flash app has to make the call to the JS script that will then
"track" the Flash app. Trying to do it in JS alone won't work.

Do you mean this is possible only if a Flash designer call my function
in his Flash code when he creates them?
That is precisely what I mean.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 10 '06 #17

Yes, that I can do. I can ask the designer to embed my function calls
in his flash script. Other than that do you have any advice?

Once again thanks.
Amit
Randy Webb wrote:
amit said the following on 7/10/2006 2:09 PM:
Randy Webb wrote:
amit said the following on 7/10/2006 12:44 PM:
Randy Webb wrote:
amit said the following on 7/6/2006 12:48 PM:

Hello Randy,

Thank you now I feel better about the image object! I believe I've
been so lucky to have ask for your advice here.

My next step is to track information on FLASH elements on a page. Do
you have any experience on this as well?
What do you mean by "track information on FLASH elements"?

Please don't quote signatures.

Hi again,

What I meant is tracking anytype of events on assets related to Flash.
Flash has to do that.

I think if you look at
http://www.google.com/support/analyt...243&topic=7292
will give a better view.
The Flash app has to make the call to the JS script that will then
"track" the Flash app. Trying to do it in JS alone won't work.


Do you mean this is possible only if a Flash designer call my function
in his Flash code when he creates them?

That is precisely what I mean.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 11 '06 #18
amit said the following on 7/11/2006 1:37 PM:
Yes, that I can do. I can ask the designer to embed my function calls
in his flash script. Other than that do you have any advice?
Yes, read the group FAQ, all of it.

<URL: http://jibbering.com/faq/#FAQ2_3>

Specifically, paragraph 6.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jul 12 '06 #19

Randy Webb wrote:
amit said the following on 7/11/2006 1:37 PM:
Yes, that I can do. I can ask the designer to embed my function calls
in his flash script. Other than that do you have any advice?

Yes, read the group FAQ, all of it.

<URL: http://jibbering.com/faq/#FAQ2_3>

Specifically, paragraph 6.
--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
Temporarily at: http://members.aol.com/_ht_a/hikksnotathome/cljfaq/
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/

Wonderful! looks good. I'm going to read it. Thanks for being such
helpful.

All the best,
Amit

Jul 12 '06 #20

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3049
by: Roger Shrubber | last post by:
I have a page with images that the user can drag from one frame to another. I need them to see a "ghost image" of the image they are dragging, while the original stays put. I use the onmousemove event to keep the ghost image under the mouse pointer. There are three problems: (1) if the ghost image is dragged so it is partially off the edge of the screen, scrollbars appear. This not only looks bad, it can cause the page to autoscroll...
0
993
by: ChrisN | last post by:
Howdy, I'm writing a web application in VB.Net. I'm using C# for all of the dynamic content on the vb pages. I'm currently building a VB page that displays a table of pictures. The page calls a C# object that populates a table with images and a couple of linkButtons for deleting and editing the images. So the table is embedded into the page and looks like this (this part works fine): Edit Delete
4
22891
by: LP | last post by:
Hello! I am still transitioning from VB.NET to C#. I undertand the basic concepts of Delegates, more so of Events and somewhat understand AsyncCallback methods. But I need some clarification on when to use one over another? If anyone could provide any additional info, your comments, best practices, any good articles, specific examples, etc. Thank you
5
2128
by: Jeff Ptak | last post by:
Can anyone tell me how to trap mouse click events in the Image control? I am trying to implement an image zoom feature using JavaScript where the user could "draw" a zoom box (aka rubber band box) on the image and the image would zoom to the extents of the box. Anyone know how to accomplish this?
3
2304
by: Mike | last post by:
Hi, I am adding controls dynamically in a WebForm, but none of these controls' events fire. Here is the class code I am using. I have tried so many things, but nothing works :-( namespace WebApplication1 { using System;
1
5803
by: Nathan Sokalski | last post by:
I want to create a pushbutton-like control on my webform that has an image on it. I used to think that this is what the ImageButton control was, but it seems to me that the ImageButton is nothing more than an image that can be clicked. I have figured out a way to make the ImageButton look like a button (there was some border property and the backgroud color). However, that still does not make it look like it is being "pushed" the way other...
1
1663
by: Tebogo Tefo via .NET 247 | last post by:
Hi I have a user control that contains three dropdownlists that I populate according to what was selected in the other dropdownlist (i.e. populate dropdownlist2 after selecting a value in dropdownlist1) The App works fine if I don't add the user control that I created and all events on the page work and thus the App is perfect. But as soon as I add my user control (Here used as the TopNav for my page) all
0
1461
by: StriderBob | last post by:
In a simple two form project, use a button on each form to Show() the other form and Hide() the current form. Add MouseEnter and MouseLeave events to both buttons so they change the image on each button when they are NOT Clicked but the cursor enters their boundary. This setup works fine. If the mouse cursor enters the button on the first form the image changes and if the button is clicked the first form disappears and the other form...
9
2319
by: Nathan Sokalski | last post by:
I have a very simple UserControl which contains an Image and a Label, which I use to display an image with a caption. I am using this control inside a DataList, setting the two Public variables using attributes in the *.aspx page. Everything displays great for the initial load, but whenever I try to add or delete an item (I have controls to do this on the page), it does not seem to be recieving any values for the public variables. Here is...
7
3448
by: MasterMax1313 | last post by:
I'm trying to make a grid of picture box controls, which I do via code. Each of these boxes has a mouseclick, mousedown, mouseup, and mouseenter event. The mouseclick event is simple enough and works fine. However, i use the mousedown, mouseup, and mouseenter events to be able to click and drag to apply the same image across all of the boxes the mouse enters (similar to a terrain editor for a game like StarCraft). I set a form wide boolean...
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10443
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10165
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9044
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.