Re: events and image
- From: Randy Webb <HikksNotAtHome@xxxxxxx>
- Date: Thu, 29 Jun 2006 17:07:18 -0400
amit said the following on 6/29/2006 4:36 PM:
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?
<img onclick="my_trker('')".....>
what I have done is:
Testing image:
<a href="" name="linkImg1"
onclick="javascript:my_trker('http://www.mywebsite.com/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!
Because you navigated there with the link.
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?
onmousedown, onmouseup, and onclick
--
Randy
comp.lang.javascript 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/
.
- References:
- events and image
- From: amit
- events and image
- Prev by Date: Re: IE DOM
- Next by Date: Re: IE DOM
- Previous by thread: Re: events and image
- Next by thread: IE DOM
- Index(es):
Relevant Pages
|