renoboi
07-16-2002, 10:56 PM
I'm trying to make one form with two actions. (one for a webmail script, the other for a message community)
Here's what I did:
<html><head>
<style type="text/css">
<!-- input { background-color: 111164; font-family: Verdana; font-size: 10pt; color: orange; border-width: 1px }
--> </style>
<script type="text/javascript" language="javascript">
<!--
submitFrm(frm,where){
if(where == 0){
frm.action = "/cgi-bin/webmail/amail.cgi"
} else {
frm.action = ="/cgi-bin/msg5/msg.cgi?action=login2"
}
frm.submit()
}
// -->
</script>
</head>
<body>
<FORM name="myfrm" METHOD="POST">
Username: <input type="text" name="amail_ID" size="20"><br>
Password: <input type="password" name="amail_passwd" size="20"><br>
<INPUT TYPE="button" NAME="GOTO" VALUE="Community" onclick="submitFrm(this.form,1)">
<INPUT TYPE="button" NAME="GOTO" VALUE="WebMail" onclick="submitFrm(this.form,0)">
<input type="hidden" name="step" value="2">
<INPUT TYPE='hidden' NAME='submitted' VALUE='1'>
</form>
and this is the error:
Line: 22
Char: 1
Error: Object expected
I get the same error on line 23.
What's wrong?
Here's what I did:
<html><head>
<style type="text/css">
<!-- input { background-color: 111164; font-family: Verdana; font-size: 10pt; color: orange; border-width: 1px }
--> </style>
<script type="text/javascript" language="javascript">
<!--
submitFrm(frm,where){
if(where == 0){
frm.action = "/cgi-bin/webmail/amail.cgi"
} else {
frm.action = ="/cgi-bin/msg5/msg.cgi?action=login2"
}
frm.submit()
}
// -->
</script>
</head>
<body>
<FORM name="myfrm" METHOD="POST">
Username: <input type="text" name="amail_ID" size="20"><br>
Password: <input type="password" name="amail_passwd" size="20"><br>
<INPUT TYPE="button" NAME="GOTO" VALUE="Community" onclick="submitFrm(this.form,1)">
<INPUT TYPE="button" NAME="GOTO" VALUE="WebMail" onclick="submitFrm(this.form,0)">
<input type="hidden" name="step" value="2">
<INPUT TYPE='hidden' NAME='submitted' VALUE='1'>
</form>
and this is the error:
Line: 22
Char: 1
Error: Object expected
I get the same error on line 23.
What's wrong?