Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I call a procedure in a hypertext link???

Status
Not open for further replies.

stessie

Programmer
Nov 22, 2000
26
IE
I have a sub procedure called Export in my ASP page
Sub export()
............
End Sub
I have an image that I am using as a link and I'm trying to call the export sub but it's not working
<a href=&quot;Statement.asp?<% = QStrg %>&quot; onclick = &quot;export()&quot;><IMG SRC=&quot;../images/button_export.gif&quot; WIDTH=&quot;51&quot; HEIGHT=&quot;19&quot; BORDER=&quot;0&quot; ALT=&quot;export&quot;></a>

I am fairly new to this so I am hoping this is something simple

Thanks in advance
 
You can try the following:

Give your <a> tag an ID,

<a href=&quot;Statement.asp?<% = QStrg %>&quot; ID=&quot;SomeName&quot;>

Then Make a vbscript onclick Event,

<script language=vbscript>
sub SomeName_onclick()
..........
end sub
</script>

This will fire whenever someone clicks on the link.

Hope this helps,
Tazzmann
 
Hi TazzMann
That worked perfectly
Thanks very much


Stessie ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top