Activating sub routine from hyperlink

R

Ruskin Hardie

Ok, I am still playing with ASP and was wondering how to do this (it seemed
simple). What I want is to have a hyperlink that when it's clicked on, will
run a sub routine, instead of opening a web page... Right now I have;

Sub CreateLinks()
Response.Write "<br><br>"
Response.Write "<a href='OpenAllOrders()'>1. All Orders</a><br>"
Response.Write "<a href='OpenCustOrders()'>2. Customer Orders</a><br>"
Response.Write "<a href='OpenInvoices.asp'>3. Open Invoices</a><br>"
End Sub

Sub OpenAllOrders()
Response.Redirect "OpenOrders.asp?Customer=0"
End Sub

Sub OpenCustOrders()
Response.Redirect "OpenOrders.asp?Customer=1"
End Sub


The issue, is that clicking on the link, tries to open a web page file of
'openallorders()', instead of running the sub routine. Obviously I am
missing something simple... Can anyone point me in the correct direction
(think it has something to do with href... maybe it should be hsub or
something).
 
R

Ruskin Hardie

Thanks for that Curt... But now I am more confused... How do I determine if
it is client or server side? How do I call the sub routine (on my servers
asp page), from a link? Can it be done?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top