www.webdeveloper.com
Results 1 to 2 of 2

Thread: need help with this script

  1. #1
    Join Date
    Dec 2002
    Posts
    2

    need help with this script

    this is the form scipt i currently have the script i need to add is below
    <body>
    <!----- 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
    } --->
    <script>
    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
    }

    }
    </script>






    <form method="POST" action="whatever.cgi" name='JavaScriptForm' onSubmit="return FormCheck()">
    <div align="center">
    <center>
    <table border="1" width="100%" height="438">
    <tr>
    <td width="33%" align="center" height="21">Server &amp; Page
    Configuration: ---\/---</td>
    <td width="33%" align="center" height="21">Form Field Configuration:
    ---\/---</td>
    <td width="34%" align="center" height="21">Output Method Configuration:
    ---\/---</td>
    </tr>
    <tr>
    <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>&nbsp;</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>&nbsp;</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>&nbsp;</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>
    <p>URL to thank you page (i.e. http://<br>
    www.mysite.com/thanks.html)<br>
    <input type="text" name="thanks_url" size="20" tabindex="5"></p>
    <p>&nbsp;</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>
    <p>E-mail address to send completed<br>
    forms to:&nbsp;<br>
    <input type="text" name="sendto_address" size="20" tabindex="7"></p>
    <p>&nbsp;</p>
    <p>Welcome Message, this will<br>
    appear at the top of the HTML&nbsp;<br>
    page:&nbsp;<br>
    <textarea rows="2" name="welcome_text" cols="20" tabindex="8"></textarea></p>
    <p><br>
    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>
    <p><br>
    </p>
    <p><br>
    </td>
    <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,
    etc...):<br>
    <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>
    </tr>
    <tr>
    <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>
    </tr>
    <tr>
    <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>
    </tr>
    <tr>
    <td width="33%" align="center" height="63">One Line <p><input type="submit" value="Submit" name="B1"></p>
    </form>
    damn couldn't post it all

  2. #2
    Join Date
    Dec 2002
    Posts
    2

    re

    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

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

    <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

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.14616 seconds
  • Memory Usage 2,856KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (2)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates