/    Sign up×
Community /Pin to ProfileBookmark

Forms- agggg

Ahh help! OK I’m trying to use a email based form with a javascript pop-up on submittion saying this is what you sent us. My problems:
1) the Pop-up shows mostly “undefined” for several of the items but not all of them.???
2) I get the email portion to work with IE but not with AOL/netscape, is there a way to do this???
3) Finally, does anyone know of a way to make the cursor jump to the next box when the max input is reach, such as with a phone number using three boxes???

Here is the Code thank you for any possible help/guidance:

<TABLE BORDER=”0″ WIDTH=”550″ align=”center”><TD>

<SCRIPT LANGUAGE=”javascript”>

function verify()

{

var OpenWindow=window.open(“”, “newwin”, “height=300,width=300”);
OpenWindow.document.write(“<HTML>”)
OpenWindow.document.write(“<head>”)
OpenWindow.document.write(“<link type=’text/css’ rel=’stylesheet’ href=’style.css’>”)
OpenWindow.document.write(“<TITLE>Request Submited</TITLE>”)
OpenWindow.document.write(“</head>”)
OpenWindow.document.write(“<body>”)
OpenWindow.document.write(“<CENTER>”)
OpenWindow.document.write(“Thank you <B>” + document.fax.company_name.value + “</B>,<B>” +document.fax.contact.value+ “</B><br>”)
OpenWindow.document.write(“The following information was Transmitted:<br>”)
OpenWindow.document.write(“” +document.fax.fax.vaue+ ” &nbsp ” +document.fax.fax2.vaue+ ” &nbsp ” +document.fax.fax3.vaue+ “<br>”)
OpenWindow.document.write(“” +document.fax.name.value+ ” / ” +document.fax.email.value+ “<br>”)
OpenWindow.document.write(“Thank You and Have a GREAT DAY.<br>”)
OpenWindow.document.write(“<FORM><INPUT TYPE=’button’ VALUE=’Close Window’ onClick=’self.close()’></FORM>”)
OpenWindow.document.write(“</CENTER>”)
OpenWindow.document.write(“</body>”)
OpenWindow.document.write(“</HTML>”)

}

</SCRIPT>

<FORM METHOD=’post’ ACTION=’mailto:[email protected]?Subject=Add to FAX list’ ENCTYPE=’text/plain’ NAME=’fax’>

<th><FIELDSET STYLE=”border-width:medium”><LEGEND><b>Fax Request</b></LEGEND>

&nbsp; Company:<INPUT TYPE=”text” NAME=”company_name” TABINDEX=”1″ SIZE=”25″ style=”background:#F9FAD0″ STYLE=”color:#327480″><br>

&nbsp; Contact:&nbsp; &nbsp;<INPUT TYPE=”text” NAME=”contact” TABINDEX=”2″ SIZE=”25″ style=”background:#F9FAD0″ STYLE=”color:#327480″><br>

&nbsp; Fax Number:<INPUT TYPE=”text” Name=”fax” TABINDEX=”3″ Maxlength=”3″ size=”3″ style=”background:#F9FAD0″ STYLE=”color:#327480″>

<INPUT TYPE=”text” Name=”fax2″ TABINDEX=”4″ Maxlength=”3″ size=”3″ style=”background:#F9FAD0″ STYLE=”color:#327480″>-

<INPUT TYPE=”text” Name=”fax3″ TABINDEX=”5″ Maxlength=”4″ size=”4″ style=”background:#F9FAD0″ STYLE=”color:#327480″><br><br>

</FIELDSET></th>

<th><FIELDSET STYLE=”border-width:medium”><LEGEND><b>Email: Optional</b></LEGEND>

Email: <INPUT TYPE=”text” TABINDEX=”6″ NAME=”email” SIZE=”30″ style=”background:#F9FAD0″ STYLE=”color:#327480″><br>

Name: <INPUT TYPE=”text” TABINDEX=”7″ SIZE=”30″ style=”background:#F9FAD0″ STYLE=”color:#327480″><br><br>

</FIELDSET></th>
</td></table>

<TABLE BORDER=”0″ WIDTH=”550″ ALIGN=”center”><TD>

<FIELDSET STYLE=”border-width:medium”><LEGEND><b>Submit</b></LEGEND>

&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<INPUT TYPE=”submit” VALUE=”Click to Submit” onClick=”verify()” TABINDEX=”8″>

&nbsp; &nbsp; &nbsp; <INPUT TITLE=”Clear Boxes” TYPE=”reset” TABINDEX=”9″><br>

<br></FIELDSET>

</FORM>
</TD></TABLE>

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@swonDec 21.2002 — Now it works (no more undefineds, there were only faults like vaue instead of value, and no field named 'name') the other hthings you asked for, I've got no idea.

<TABLE BORDER="0" WIDTH="550" align="center"><TD>


<SCRIPT LANGUAGE="javascript">

function verify()

{

var OpenWindow=window.open("", "newwin", "height=300,width=300");

OpenWindow.document.write("<HTML>")

OpenWindow.document.write("<head>")

OpenWindow.document.write("<link type='text/css' rel='stylesheet' href='style.css'>")

OpenWindow.document.write("<TITLE>Request Submited</TITLE>")

OpenWindow.document.write("</head>")

OpenWindow.document.write("<body>")

OpenWindow.document.write("<CENTER>")

OpenWindow.document.write("Thank you <B>" + document.fax.company_name.value + "</B>,<B>" +document.fax.contact.value+ "</B><br>")

OpenWindow.document.write("The following information was Transmitted:<br>")

OpenWindow.document.write(document.fax.fax.value+ " " +document.fax.fax2.value + " " +document.fax.fax3.value+ "<br>")

OpenWindow.document.write(document.fax.name.value+ " / " +document.fax.email.value+ "<br>")

OpenWindow.document.write("Thank You and Have a GREAT DAY.<br>")

OpenWindow.document.write("<FORM><INPUT TYPE='button' VALUE='Close Window' onClick='self.close()'></FORM>")

OpenWindow.document.write("</CENTER>")

OpenWindow.document.write("</body>")

OpenWindow.document.write("</HTML>")

}

</SCRIPT>



<FORM METHOD='post' ACTION='mailto:[email protected]?Subject=Add to FAX list' ENCTYPE='text/plain' NAME='fax'>

<th><FIELDSET STYLE="border-width:medium"><LEGEND><b>Fax Request</b></LEGEND>

Company:<INPUT TYPE="text" NAME="company_name" TABINDEX="1" SIZE="25" style="background:#F9FAD0" STYLE="color:#327480"><br>

Contact: <INPUT TYPE="text" NAME="contact" TABINDEX="2" SIZE="25" style="background:#F9FAD0" STYLE="color:#327480"><br>

Fax Number:<INPUT TYPE="text" Name="fax" TABINDEX="3" Maxlength="3" size="3" style="background:#F9FAD0" STYLE="color:#327480">

<INPUT TYPE="text" Name="fax2" TABINDEX="4" Maxlength="3" size="3" style="background:#F9FAD0" STYLE="color:#327480">-

<INPUT TYPE="text" Name="fax3" TABINDEX="5" Maxlength="4" size="4" style="background:#F9FAD0" STYLE="color:#327480"><br><br>

</FIELDSET></th>


<th><FIELDSET STYLE="border-width:medium"><LEGEND><b>Email: Optional</b></LEGEND>

Email: <INPUT TYPE="text" TABINDEX="6" NAME="email" SIZE="30" style="background:#F9FAD0" STYLE="color:#327480"><br>

Name: <INPUT TYPE="text" name="name" TABINDEX="7" SIZE="30" style="background:#F9FAD0" STYLE="color:#327480"><br><br>

</FIELDSET></th>

</td></table>


<TABLE BORDER="0" WIDTH="550" ALIGN="center"><TD>

<FIELDSET STYLE="border-width:medium"><LEGEND><b>Submit</b></LEGEND>

<INPUT TYPE="submit" VALUE="Click to Submit" onClick="verify()" TABINDEX="8">

<INPUT TITLE="Clear Boxes" TYPE="reset" TABINDEX="9"><br>



<br></FIELDSET>



</FORM>

</TD></TABLE>
Copy linkTweet thisAlerts:
@bodhyauthorDec 21.2002 — Hey Swon thank you very much!
×

Success!

Help @bodhy spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.2,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,
)...