Results 1 to 2 of 2

Thread: Describe how this HTML code produces the form displayed in the browser?

  1. #1
    Join Date
    Mar 2014
    Beans
    3

    Describe how this HTML code produces the form displayed in the browser?

    I've got to do some research on the questions below any advice and hints you can give me for I'd be grateful for.
    Thanks
    Jacob
    Describe how this HTML code produces the form displayed in the browser?



    Describe how the JavaScript function performs the validation check?



    <head>
    <title>Exam entry</title>


    <script language=”javascript” type=”text/javascript”>


    function validateForm() {
    var result = true;
    var msg=””;


    if (document.ExamEntry.name.value==””) { msg+=”You must enter your name \n”; document.ExamEntry.name.focus(); document.getElementById(‘name’).style.color=”red”; result = false;
    }

    if (document.ExamEntry.subject.value==””) { msg+=”You must enter the subject \n”; document.ExamEntry.subject.focus(); document.getElementById(‘subject’).style.color=”re d”; result = false;

    }


    if(msg==””){

    return result;

    }


    { alert(msg) return result;

    }

    }


    </script>

    </head>


    <body>

    <h1>Exam Entry Form</h1>

    <form name=”ExamEntry” method=”post” action=”success.html”>

    <table width=”50%” border=”0”>

    <tr>

    <td id=”name”>Name</td>

    <td><input type=”text” name=”name” /></td>

    </tr>

    <tr>

    <td id=”subject”>Subject</td>

    <td><input type=”text” name=”subject” /></td>

    </tr>


    <tr>

    <td><input type=”submit” name=”Submit” value=”Submit” onclick=”return validateForm();” /></td>

    <td><input type=”reset” name=”Reset” value=”Reset” /></td>

    </tr>


    </table>

    </form>

    </body>




  2. #2
    Join Date
    Sep 2006
    Location
    France.
    Beans
    Hidden!
    Distro
    Lubuntu Development Release

    Re: Describe how this HTML code produces the form displayed in the browser?

    Please see here : http://ubuntuforums.org/showthread.p...9#post12953049

    If you want your thread reopened, please ask so with a valid explanation. You can have an Admin have la look if you start a thread in the Resolution Centre, thanks.
    Closing again.
    | My old and mostly abandoned blog |
    Linux user #413984 ; Ubuntu user #178
    J'aime les fraises.
    Nighty night me lovelies!

    | Reinstalling Ubuntu ? Please check this bug first ! |
    | Using a ppa ? Please install ppa-purge from universe, you may need it should you want to revert packages back |
    | No support requests by PM, thanks |

Tags for this Thread

Bookmarks

Posting Permissions

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