Forums

This topic is locked

Working with Buttons

Posted 04 Feb 2003 15:25:53
1
has voted
04 Feb 2003 15:25:53 Stephen Miller posted:
How do I link code directly to a button on a form to redirect to another page once the button is clicked?

Replies

Replied 04 Feb 2003 15:49:29
04 Feb 2003 15:49:29 Stephen Miller replied:
Thanks for the comment, but what i want to do is go to a certain page when a button is clicked.

I've tried:

<script language="vbscript">
Sub button_Onclick
response.redirect("whatever")
End Sub
</Script>

but it doesn't work

Stephen
Replied 04 Feb 2003 16:36:43
04 Feb 2003 16:36:43 Julio Taylor replied:
<script language="JavaScript" type="text/JavaScript">
function MM_goToURL()
{
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'";
}
</script>

then:

<input name="Button" type="button" onClick="MM_goToURL('parent','<insert url>');return document.MM_returnValue" value="Button">

------------------------
Julio

PHP | MySQL | DWMX | ColdFusion

ICQ: 19735247

Reply to this topic