Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    1
    Member #
    17306
    Hi<br>
    I have a site with a form allowing users to fill out details, click
    'submit' and the info is emailed to a site email address. It is working
    fine in Firefox but in Explorer the form is received without any of the
    user info. See code below.&nbsp; The exe file in the form action is a delphi script done in our IT dept.&nbsp; They say that because it works in firefox, the problem must be in my HTML/javascript rather than that file.<br>Any help greatly appreciated,<br>Billy<br>
    <br>
    function validate_form( )<br>
    {<br>
    var name = document.journalrequest.RequestedBy;<br>
    var email = document.journalrequest.EmailAddress;<br>
    <br>
    if (name.value == "")<br>
    {<br>
    window.alert("Please enter your name.");<br>
    name.focus();<br>
    return false;<br>
    }<br>
    <br>
    if (email.value == "")<br>
    {<br>
    window.alert("Please enter a valid e-mail address.");<br>
    email.focus();<br>
    return false;<br>
    }<br>
    <br>
    if (email.value.indexOf("@", 0) &lt; 0)<br>
    {<br>
    window.alert("Please enter a valid e-mail address.");<br>
    email.focus();<br>
    return false;<br>
    }<br>
    <br>
    if (email.value.indexOf(".", 0) &lt; 0)<br>
    {<br>
    window.alert("Please enter a valid e-mail address.");<br>
    email.focus();<br>
    return false;<br>
    }<br>
    return true;<br>
    }<br>
    <br>
    <br>
    ----------------------<br>
    <br>
    <br>
    &lt;form action="../../../staffdata/cgi-bin/wacontact.exe/BookRequest"
    method="get" enctype="text/plain" onSubmit="return validate_form( );"
    name="journalrequest" id="journalrequest" &gt;<br>
    &lt;fieldset&gt;<br>
    &lt;p&gt; <br>
    &lt;label for="Author"&gt;Author/Údar: <br>
    &lt;input name="Author" type="text" class="texta" tabindex="1" size="50" /&gt;<br>
    &lt;/label&gt;<br>
    &lt;/p&gt;<br>
    &lt;p&gt; <br>
    &lt;label for="Title"&gt;Title/Teideal: <br>
    &lt;input name="Title" type="text" tabindex="3" size="50" /&gt;<br>
    &lt;/label&gt;<br>
    &lt;/p&gt;<br>
    &lt;p&gt; <br>
    &lt;label for="Year"&gt;Year/&lt;font size="3"&gt;Bliain&lt;/font&gt;: <br>
    &lt;input name="Year" type="text" size="5" tabindex="4" /&gt;<br>
    &lt;/label&gt;<br>
    &lt;label for="Ed"&gt;Ed.&lt;font size="3"&gt;/Eagrán&lt;/font&gt;: <br>
    &lt;input name="Ed" type="text" size="5" tabindex="5"/&gt;<br>
    &lt;/label&gt;<br>
    &lt;label for="Price"&gt;Price&lt;font size="3"&gt;/Luach&lt;/font&gt;: <br>
    &lt;input name="Price" type="text" size="8" tabindex="6" /&gt;<br>
    &lt;/label&gt;<br>
    &lt;label for="ISBN"&gt;ISBN: <br>
    &lt;input name="ISBN" type="text" size="13" tabindex="7" /&gt;<br>
    &lt;/label&gt;<br>
    &lt;/p&gt;<br>
    &lt;p&gt; <br>
    &lt;label for="Publisher"&gt;Publisher/Foilsitheoir: <br>
    &lt;input name="Publisher" type="text" tabindex="8" size="50"/&gt;<br>
    &lt;/label&gt;<br>
    &lt;/p&gt;<br>
    &lt;p&gt; <br>
    &lt;label for="No of copies"&gt;No of copies/Líon na gCóipeanna: <br>
    &lt;input name="NoOfCopies" type="text" tabindex="9" size="5"/&gt;<br>
    &lt;/label&gt;<br>
    &lt;/p&gt;<br>
    &lt;label for="Reference Only"&gt;Reference Only/Tagairt Amháin: <br>
    &lt;input name="ReferenceOnly" type="checkbox" value="Reference Only" tabindex="10"/&gt;<br>
    &lt;br /&gt;<br>
    3Hr/3 Uair: <br>
    &lt;input name="3Hr" type="checkbox" value="3 Hr" tabindex="11"/&gt;<br>
    &lt;br /&gt;<br>
    24Hr/24 Uair: <br>
    &lt;input name="24Hr" type="checkbox" value="24 Hr" tabindex="12"/&gt;<br>
    &lt;br /&gt;<br>
    Main Borrowing/Príomh Iasachta: <br>
    &lt;input name="MainBorrowing" type="checkbox" value="Main Borrowing" tabindex="13"/&gt;<br>
    &lt;br /&gt;<br>
    &lt;/label&gt;<br>
    &lt;p&gt; <br>
    &lt;label for="Requested By"&gt;Requested By&lt;font size="3"&gt;/Ainm an Iarratasóra&lt;/font&gt;: <br>
    &lt;input name="RequestedBy" type="text" tabindex="14" maxlength="30"/&gt;<br>
    &lt;/label&gt;<br>
    &lt;label for="ID No"&gt;ID No: <br>
    &lt;input name="IDNo" type="text" tabindex="15" /&gt;<br>
    &lt;/label&gt;<br>
    &lt;/p&gt;<br>
    &lt;label for="Dept"&gt;Dept./Roinn:&lt;/label&gt;<br>
    &lt;select name="Dept" tabindex="16"&gt;<br>
    &lt;option value&gt;--Select--&lt;/option&gt;<br>
    &lt;option value="Administration"&gt;Administration&lt;/option&gt;<br>
    &lt;option value="Education"&gt;Education&lt;/option&gt;<br>
    &lt;option value="English"&gt;English&lt;/option&gt;<br>
    &lt;option value="French"&gt;French&lt;/option&gt;<br>
    &lt;option value="Gaeilge"&gt;Gaeilge&lt;/option&gt;<br>
    &lt;option value="Geography"&gt;Geography&lt;/option&gt;<br>
    &lt;option value="History"&gt;History&lt;/option&gt;<br>
    &lt;option value="Humanities"&gt;Humanities&lt;/option&gt;<br>
    &lt;option value="IT"&gt;IT Services&lt;/option&gt;<br>
    &lt;option value="Library"&gt;Library&lt;/option&gt;<br>
    &lt;option value="Mathematics"&gt;Mathematics&lt;/option&gt;<br>
    &lt;option value="Music"&gt;Music&lt;/option&gt;<br>
    &

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Hi.

    You should edit your post and wrap your code in [ html ] [ / html ] tags (minus the spaces).

    One thing I did notice was that your event handler onSubmit should be onsubmit but I do not think that is why this is failing.

    At the start of the script after you assign the form values to name and email, try window.alert(name) and window.alert(email). What do you get?

    Finally I am not sure if it's the forum or your code but all your < are &lt; but they should be <.

    Edit: Again, I am not sure if you added them in because you thought it would make your script easier to read, but your JavaScript validate_form has a lot of <br />'s which just should not be there.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:58 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com