[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: call event with graphic?



On Mar 6,  4:18pm, Gordon Mueller wrote:

> How can you call a script with a HREF? I am trying to call the
> script when a user clicks on a graphic. Using a form would be fine,
> but I didn't find a way to get JavaScript to use its handlers on an
> image. Any ideas?

Right now, I just add an onClick= directive to the HREF tag, and have the HREF
point to a dummy frame in my window . . .

<A HREF="title.html" TARGET="Win_Title" onClick="javaScript() ; return true">

where Win_Title is a frame that always displays the small static page
"title.html".

What I want to know is, can I just leave the HREF out?:

<A onClick="javaScript() ; return true"> 	or
<A HREF onClick="javaScript() ; return true">

Brian

-- 
  d a t a b a s e s    a r e   i n   o u r  g e n e s
  ----------------------------------------------------
  Brian Karlak   bkarlak@panbio.com  (510) 337-7910 ph
  Manager, SciApps Group             (510) 522-9394 fx
  ----------------------------------------------------
  P  A  N  G  E  A     S  Y  S  T  E  M  S     I  N  C
--------------------------------------------------------------------
For help about the list, please send a message to 'majordomo@obscure.org'
with the message body 'help'. To unsubscribe, send a message to
'majordomo@obscure.org' with the message body 'unsubscribe javascript'.
List archives and pointer to FAQ: http://www.obscure.org/javascript/