Click to See Complete Forum and Search --> : Need help with Activex and ASP.


damica
August 20th, 2002, 09:09 AM
Hello:

I want to thank all that reply.

I have finally got a Command button (Activex) on one of my ASP pages. Here is all I am trying to do. When the command button is clicked I want it to goto another ASP page. Here is my code.

<Script Language="VBScript">
Sub Commandbutton1_Click

end sub
</Script>

I have tried. <a href="srchtitles.asp"</a> this does not work. Can someone point me in the right direction?

Thanks
David M. Camp

ShawnDev
August 21st, 2002, 02:34 AM
Response.Redirect "url"

Surrendermonkey
August 21st, 2002, 06:00 AM
<Script Language="VBScript">
Sub Commandbutton1_onClick() ' note the "on"
window.navigate("this.asp")
end sub
</Script>

alternatively, you can use:
<input type="button" onclick="functionName()" value="click me">
along with (usually in <head></head>):
<script language="vbscript">
sub functionName()
window.navigate("this.asp")
end Sub
</script>

or even:
<input type="button" name="commandButton1">
<script language="vbscript" FOR="commandButton1" event="onclick">
window.navigate("this.asp")
</script>

ShawnDev's "Response.redirect" advice is server side, so perhaps he (or I) misunderstood your question.

ShawnDev
August 21st, 2002, 08:25 PM
ShawnDev's "Response.redirect" advice is server side, so perhaps he (or I) misunderstood your question.


Ack! That is correct. I keep forgetting I'm in the Client Scripting forum...