www.webdeveloper.com
Results 1 to 2 of 2

Thread: someone plss help

Hybrid View

  1. #1
    Join Date
    Mar 2009
    Posts
    1

    Unhappy someone plss help

    <html>
    <head>
    <title>MY RESUME</title>
    </head>

    <style type ="text/css">
    body{ background-color: black;
    font-family: sans-serif;}
    label{color:white;}
    p { font-size: 11px;
    word-spacing: 10px; }
    ul{font-style: italic}
    h3{ text-decoration: underline; }
    html{margin: 2px; border: 3px solid red;}
    em{color:white;}
    textarea{border-style: double;
    border-color:red;}
    input{border-style: double;
    border-color:red;}
    </style>
    <script type="text/javascript">
    <function validateEmpty(fld) {
    var error = "";

    if (fld.value.length == 0) {
    fld.style.background = 'Yellow';
    error = "The required field has not been filled in.\n"
    } else {
    fld.style.background = 'White';
    }
    return error;
    }
    </script>
    function validateEmpty(fld) {
    var error = "";

    if (fld.value.length == 0) {
    fld.style.background = 'Yellow';
    error = "The required field has not been filled in.\n"
    } else {
    fld.style.background = 'White';
    }
    return error;
    }

    <body>
    <form action="MAILTOungun_Clanz@hotmail.com" method="post" enctype="text/plain">
    <h2><b><em>MY RESUME</em></b></h2>
    <table border="0" width="50%">
    <tbody>
    <tr>
    <td><label>Your Name :</label></td>

    <td><input name="Name" type="text" size="25"/></td>
    </tr>
    <tr>
    <td><label>Your Address :</label></td>
    <td><textarea name="Address" rows="2" cols="25"></textarea></td>
    </tr>
    <tr>
    <td><label>Your IC Number :</label></td>
    <td><input name="IC" type="text" size="25"/></td>
    </tr>

    <tr>
    <td><label>Career Focus :</label></td>

    <td><textarea name="Career" rows="2" cols="25"></textarea></td>
    </tr>
    <tr>
    <td><label>Education :</label></td>
    <td><textarea name="Education" rows="2" cols="25"></textarea></td>
    </tr>
    <tr>
    <td><label>Experience :</label></td>
    <td><textarea name="Experience" rows="2" cols="25"></textarea></td>
    </tr>
    <tr>
    <td><label>PR Executive :</label></td>

    <td><textarea name="PR Executive" rows="2" cols="25"></textarea></td>
    </tr>
    <tr>
    <td><label>Intern :</label></td>
    <td><textarea name="Intern" rows="2" cols="25"></textarea></td>
    </tr>
    </tbody>
    </table>
    <p>
    <input type = "submit" value = "Submit" />
    <input type = "reset" value = "Reset" />

    </p>

    </form>
    </body>
    </html>

    that is my original newbie html coding.
    i got problem where by i don't know how to:

    -prompt an error alert if one of the compulsory field didn't have input.
    -prompt an error if the email field didn't match email format.
    -prompt a greeting when user enter the site.
    -Prompt an instruction on how to fill the field popup when user click on information link
    -user can change font size by one click and the page refresh
    -an automatically calculate of user age when they inserted their birthday and their age appear in email..

    i really don't know how to do it..and really want to learn..please help.. thanks


  2. #2
    Join Date
    Mar 2009
    Posts
    4

    Im still a newbie... So dont expect much

    Maybe I show you a simple way of validating email maybe.
    You can either use onsubmit() or onblur() event handlers.
    First you need a function.
    Code:
    function validate_email()
    {
    var string1=document.example.email.value
    if (string1.indexOf("@")==-1)
       {
       alert("Insert a darn valid email!");
       document.example.email.focus();
       }
    }
    You need the form obviously.

    Code:
    <form name="example">
    <input type="text" size="20" name="email" onblur="validate_email()">
    </form>
    For the greetings. It's really easy. Just use body.onload

    Again the function.

    Code:
    function alert_user()
    {
    alert("Welcome!");
    }
    And the body onload.

    Code:
    <body onload="alert_user()">
    </body>
    Last edited by Shazwi; 03-01-2009 at 09:50 PM.

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



Recent Articles