Crash1hd
11-09-2003, 03:43 AM
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<script>
function activity(){
this.form.action='asppage.asp'
}
</script>
<form method="post">
<input type=button value="click me" onclick="activity()">
</form>
</BODY>
</HTML>
gives me an error of this.form is null
ok so doing the following seems to have fixed that yet I am now getting the same error on this code
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT language="JavaScript">
function activity(object){
object.action='http://www.google.com'
}
</script>
</HEAD>
<BODY>
<form>
<A HREF="#" onClick="activity(this.form)">blah</A>
<A HREF="#" onClick="this.form.action='http://www.google.com';">blaa</A>
<input type='submit' value='click me' onClick="activity(this.form)">
<input type='submit' value='Go Back' onClick="this.form.action='http://www.google.com';">
</form>
</BODY>
</HTML>
the blaa and the blah give the error
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<script>
function activity(){
this.form.action='asppage.asp'
}
</script>
<form method="post">
<input type=button value="click me" onclick="activity()">
</form>
</BODY>
</HTML>
gives me an error of this.form is null
ok so doing the following seems to have fixed that yet I am now getting the same error on this code
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<SCRIPT language="JavaScript">
function activity(object){
object.action='http://www.google.com'
}
</script>
</HEAD>
<BODY>
<form>
<A HREF="#" onClick="activity(this.form)">blah</A>
<A HREF="#" onClick="this.form.action='http://www.google.com';">blaa</A>
<input type='submit' value='click me' onClick="activity(this.form)">
<input type='submit' value='Go Back' onClick="this.form.action='http://www.google.com';">
</form>
</BODY>
</HTML>
the blaa and the blah give the error