🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.lang.javascript
4 messages
4 total messages Started by Greg Gagnaux Thu, 19 Nov 1998 00:00
HREF and JavaScript - Newbie question
#78
Author: Greg Gagnaux
Date: Thu, 19 Nov 1998 00:00
24 lines
1412 bytes
Now let me see if I can ask the correct question (I'm a total newbie
to this)

Is it possible to invoke a JavaScript function via an Image's HREF.

ie

<a href="somepage.asp" target="_top"><img
src="../../images/formbuttons/save.gif" border="0" alt="Add a new
incident step" WIDTH="47" HEIGHT="24"></a>

but instead do something like this

<a href=some JavaScript code  target="_top"><img
src="../../images/formbuttons/save.gif" border="0" alt="Add a new
incident step" WIDTH="47" HEIGHT="24"></a>


Thanks in advance!


Greg Gagnaux
Mindquake Software Inc
ggagnaux@mindquake.com
Re: HREF and JavaScript - Newbie question
#79
Author: Greg Gagnaux
Date: Thu, 19 Nov 1998 00:00
12 lines
1197 bytes
I found some code like the following which seems to answer my first
question.

<TD BGCOLOR="#000000"><A HREF="JavaScript:l()"
onMouseOver="r('#000000'); return true"> <IMG SRC="w.gif" HEIGHT=10
WIDTH=10 BORDER=0> </A> </TD>

My second question is - Will this run on IE3.0?  Can anyone tell just
by looking at it?

Thanks,
Greg.
Re: HREF and JavaScript - Newbie question
#80
Author: IC
Date: Thu, 19 Nov 1998 00:00
41 lines
1563 bytes
ya

<a href="javascript: myFunc()">whatever</a>

or you can use an onmouseclick on the image or whatever.

--
Duan Nguyen
http://www.3-cities.com/~duan



Greg Gagnaux <gagnaux@ibm.net> wrote in message
news:HS152.3235$%X5.8017200@newsgate.direct.ca...
>Now let me see if I can ask the correct question (I'm a total newbie
>to this)
>
>Is it possible to invoke a JavaScript function via an Image's HREF.
>
>ie
>
><a href="somepage.asp" target="_top"><img
>src="../../images/formbuttons/save.gif" border="0" alt="Add a new
>incident step" WIDTH="47" HEIGHT="24"></a>
>
>but instead do something like this
>
><a href=some JavaScript code  target="_top"><img
>src="../../images/formbuttons/save.gif" border="0" alt="Add a new
>incident step" WIDTH="47" HEIGHT="24"></a>
>
>
>Thanks in advance!
>
>
>Greg Gagnaux
>Mindquake Software Inc
>ggagnaux@mindquake.com
>
>
>
Re: HREF and JavaScript - Newbie question
#81
Author: Catherine Skidmore
Date: Fri, 20 Nov 1998 00:00
22 lines
1500 bytes
Greg Gagnaux wrote:
> 
> I found some code like the following which seems to answer my first
> question.
> 
> <TD BGCOLOR="#000000"><A HREF="JavaScript:l()"
> onMouseOver="r('#000000'); return true"> <IMG SRC="w.gif" HEIGHT=10
> WIDTH=10 BORDER=0> </A> </TD>
> 
> My second question is - Will this run on IE3.0?  Can anyone tell just
> by looking at it?

It depends on what the r() function does. If it's an image rollover,
forget it :-)

-catherine
-- 

Catherine Skidmore
http://www.suck-my-big.org
"I am not posing as anyone else and that is the LAST time I will dignify
your idiotic ramblings with a response."  - danbel
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads