You are trying to execute a server side comand from client side script.
Server side ASP code is executed first before the page reaches the browser,
so it will attempt to do the redirect when it reaches that line as it
executes the ASP code.
You will fist of all get a syntax error. Redirect is a method, not a
property so you need to pass a parameter in, rather than setting it equal to
something. e.g. response.redirect "dirquery.htm" is the correct syntax.
However, this will still result in an error as the redirect method creates
an http header, which can only be done before any HTML has been written.
But in any case, thats not what you want to use. You want the page to
change when the button is clicked, so you need to use client side script:
<input type="button" value="Start New Query"
onClick="window.navigate("dirquery.htm");" >
-----Original Message-----
From: Isaac Sogunro [mailto:ilatine@h...]
Sent: 26 July 2001 18:57
To: javascript
Subject: [javascript] Button question(IS)
Hello all.
Is this correct? I get an error when I run this. What am I doing wrong?
<input type="button" value="Start New Query" onClick="<% Response.Redirect
dirquery.htm %>" >