Results 1 to 2 of 2

Thread: need help with this script

  1. #1
    Join Date
    Dec 2002

    need help with this script

    this is the form scipt i currently have the script i need to add is below
    <!----- if (document.JavaScriptForm.program.value==""){
    alert("The work order description that you are requesting must be entered to continue");
    document.JavaScriptForm.program.focus();return false
    } --->
    function FormCheck() {
    if (document.JavaScriptForm.perl_path.value==""){
    alert("Your perl path must be entered to continue");
    document.JavaScriptForm.perl_path.focus();return false
    if (document.JavaScriptForm.sendmail_path.value==""){
    alert("Your send mail path must be entered to continue");
    document.JavaScriptForm.sendmail_path.focus();return false
    if (document.JavaScriptForm.absolute_path.value==""){
    alert("The absolute path must be entered to continue");
    document.JavaScriptForm.absolute_path.focus();return false
    if (document.JavaScriptForm.file_name.value==""){
    alert("The file name must be entered to continue");
    document.JavaScriptForm.file_name.focus();return false
    if (document.JavaScriptForm.thanks_url.value==""){
    alert("Your Thanks Url must be entered to continue");
    document.JavaScriptForm.thanks_url.focus();return false
    if (document.JavaScriptForm.page_title.value==""){
    alert("Your page title must be entered to continue");
    document.JavaScriptForm.page_title.focus();return false
    if (document.JavaScriptForm.sendto_address.value==""){
    alert("The e-mail address must be entered to continue");
    document.JavaScriptForm.sendto_address.focus();return false
    if (document.JavaScriptForm.welcome_text.value==""){
    alert("The welcome message must be entered to continue");
    document.JavaScriptForm.program.focus();return false
    if (document.JavaScriptForm.email_subject.value==""){
    alert("Your subject for the e-mail must be entered to continue");
    document.JavaScriptForm.email_subject.focus();return false
    if (document.JavaScriptForm.textfield1name.value==""){
    alert("Your one line text box must be entered to continue");
    document.JavaScriptForm.textfield1name.focus();return false
    if (document.JavaScriptForm.textfield1label.value==""){
    alert("Your one line label must be entered to continue");
    document.JavaScriptForm.textfield1label.focus();return false
    if (document.JavaScriptForm.textfield1print.value==""){
    alert("The textfield1print must be entered to continue");
    document.JavaScriptForm.textfield1print.focus();return false
    if (document.JavaScriptForm.textfield2name.value==""){
    alert("Your e-mail address must be entered to continue");
    document.JavaScriptForm.textfield2name.focus();return false
    if (document.JavaScriptForm.textfield2print.value==""){
    alert("The preceding text must be entered to continue");
    document.JavaScriptForm.textfield2print.focus();return false


    <form method="POST" action="whatever.cgi" name='JavaScriptForm' onSubmit="return FormCheck()">
    <div align="center">
    <table border="1" width="100%" height="438">
    <td width="33%" align="center" height="21">Server &amp; Page
    Configuration: ---\/---</td>
    <td width="33%" align="center" height="21">Form Field Configuration:
    <td width="34%" align="center" height="21">Output Method Configuration:
    <td width="33%" align="center" rowspan="8" height="535" valign="top">&nbsp;
    <p>Enter the Perl path on your server:<br>
    (i.e. /usr/bin/perl)<br>
    <input type="text" name="perl_path" size="20" tabindex="1"></p>
    <p>Enter the path to your server's sendmail<br>
    application (i.e. /usr/sbin/sendmail<br>
    <input type="text" name="sendmail_path" size="20" tabindex="2"></p>
    <p>Enter the absolute path to the location<br>
    where this program will reside on your<br>
    server (i.e. /my/webs/cgi-bin/form/)<br>
    <input type="text" name="absolute_path" size="20" tabindex="3"></p>
    <p>Enter the filename that you will call<br>
    this script. (i.e. form.cgi) must end in &quot;.cgi&quot;<br>
    <input type="text" name="file_name" size="20" tabindex="4"><br>
    <p>URL to thank you page (i.e. http://<br>
    <input type="text" name="thanks_url" size="20" tabindex="5"></p>
    <p>HTML Page Title (i.e.&nbsp;<br>
    Welcome to Mike's Form!)<br>
    <input type="text" name="page_title" size="20" tabindex="6"><br>
    <p>E-mail address to send completed<br>
    forms to:&nbsp;<br>
    <input type="text" name="sendto_address" size="20" tabindex="7"></p>
    <p>Welcome Message, this will<br>
    appear at the top of the HTML&nbsp;<br>
    <textarea rows="2" name="welcome_text" cols="20" tabindex="8"></textarea></p>
    Enter the subject line you would<br>
    like to use for e-mail delivery: (i.e.<br>
    Web Page Response)<br>
    <input type="text" name="email_subject" size="20" tabindex="9"></p>
    <td width="33%" align="center" height="73">One-Line Text Box:<br>
    enter name below without any spaces, underscores are acceptable:<br>
    <input type="text" name="textfield1name" size="20" tabindex="10">
    <p>Enter the Text that should display next to the text box on the form
    that the user will see, for example, a description of what the user
    should type into the field (like this) (i.e. Your Name, Enter Age,
    <input type="text" name="textfield1label" size="20" tabindex="11"></td>
    <td width="34%" align="center" height="73">Enter the text you would like
    to precede the value entered by the user (i.e. &quot;The user's name
    is:&quot;) So for example, The user's name is: Tom. would appear if
    the user had entered &quot;Tom&quot;<br>
    <textarea rows="6" name="textfield1print" cols="26" tabindex="12"></textarea> </td>
    <td width="33%" align="center" height="64">One-Line Text Box:<br>
    enter name below, default is email, leave this one set to email if you
    intend to collect the user's email address. Otherwise, leave blank.<br>
    <input type="text" name="textfield2name" size="20" value="email" tabindex="13">
    <p>Enter the text that should display next to the text box: <br>
    <input type="text" name="textfield2label" size="20" value="E-Mail Address" tabindex="14"></td>
    <td width="34%" align="center" height="64">Enter preceding text:<br>
    <textarea rows="6" name="textfield2print" cols="26" tabindex="15">The user's e-mail address is:</textarea></td>
    <td width="33%" align="center" height="63">One Line Test Box:<br>
    This can be anything you want, remember, no spaced allowed in the
    name. <br>
    <input type="text" name="textfield3name" size="20" tabindex="16">
    <p>Enter the text that should display next to the text box:<br>
    <input type="text" name="textfield3label" size="20" tabindex="17"></td>
    <td width="34%" align="center" height="63">Enter preceding text:<br>
    <textarea rows="6" name="textfield3print" cols="26" tabindex="18"></textarea></td>
    <td width="33%" align="center" height="63">One Line <p><input type="submit" value="Submit" name="B1"></p>
    damn couldn't post it all

  2. #2
    Join Date
    Dec 2002


    the last post had enough of the main script
    this is the script i need to add to it if you can please tell me what i need to do or repost it here completed u can e-mail me at chriscale@yahoo.com or via aim at a73145

    function emailcheck(cur)
    var string1=cur.email.value
    if (string1.indexOf("@")==-1)
    alert("Please input a valid email address!")
    return false

    <form onsubmit="return emailcheck(this)">

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center