Need to format the cell phone and home phone cells

Discussion in 'JavaScript' started by rhoula, Sep 22, 2013.

  1. #1
    I need to format the cell phone and home phone fields. Please help.

    <html>
    <head></head>
    <body>
    
    
    <a href="add.php">Add new</a><br>
    <a href="display.php">Display table</a><br>
    <a href="delete.php">Delete</a><br><br><br>
    
    <form action="insert.php" method="post"><table>
    <tr>
    <td>Store</td>
    <td><select name="Store">
    <option value="Cave">Cave</option>
    <option value="Valero">Valero</option>
    <option value="Frisco">Frisco</option>
    <option value="Munchies">Munchies</option>
    </td></tr>
    <tr>
    <td>First Name</td>
    <td><input type="text" id="first_name" name="first_name" /></td>
    <tr>
    <td>Last Name</td>
    <td><input type="text" id="last_name" name="last_name" /></td>
    <tr>
    <td>Date Of Birth</td>
    <td><input type="text" id="date_of_birth" name="date_of_birth" /></td>
    <tr>
    <td>SSN</td>
    <td><input type="text" id="ssn" name="ssn" /></td>
    <tr>
    <td>Married/Single</td>
    <td><select name="married_single">
    <option value="  ">  </option>
    <option value="Married">Married</option>
    <option value="Single">Single</option></td></tr>
    <tr>
    <td>Deductions</td>
    <td><input type="text" id="deductions" name="deductions" /></td>
    <tr>
    <td>Address</td>
    <td><input type="text" id="address" name="address" /></td>
    <tr>
    <td>City</td>
    <td><input type="text" id="city" name="city" /></td>
    <tr>
    <td>Zip</td>
    <td><input type="text" id="zip" name="zip" /></td>
    <tr>
    <td>Cell Phone Number</td>
    <td><input type="text" id="Cell_number" name="Cell_number" /></td>
    <tr>
    <td>Home Phone Number</td>
    <td><input type="text" id="Home_number" name="Home_number" /></td>
    <tr>
    <td>Emergency Contact</td>
    <td><input type="text" id="Emergency_contact_name" name="Emergency_contact_name" /></td>
    <tr>
    <td>Emergency Contact Phone</td>
    <td><input type="text" id="Emergency_contact_number" name="Emergency_contact_number" /></td>
    <tr>
    <td>Hourly/Salary</td>
    <td><select name="hourly_salary">
    <option value="Hourly">Hourly</option>
    <option value="Salary">Salary</option></td></tr>
    <tr>
    <td>Rate</td>
    <td><input type="text" id="rate" name="rate" /></td>
    <tr>
    <td>Start Date</td>
    <td><input type="text" id="Start_Date" name="Start_Date" /></td>
    <tr>
    <td>End Date</td>
    <td><input type="text" id="End_Date" name="End_Date" /></td>
    <tr>
    <td>Password</td>
    <td><input type="text" id="Password" name="Password" /></td>
    <tr>
    <td>Comments</td>
    <td><input type="text" name="Comment" /></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <input type="submit">
    </tr>
    </table>
    </form>
    
    </body>
    </html>
    HTML:

     
    rhoula, Sep 22, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Define "format" -- how do you want it formatted?!? Much less what's that got to do with javascript since step one should always be, PARTICULARLY ON FORMS, to make it work WITHOUT scripting FIRST! (since anything you do client-side MUST be duplicated server-side on a form)

    Of course, that train wreck of outdated busted inaccessible markup can't be helping matters... where are your LABELs and FIELDSET? Why are you using tables for layout like it's still 1997? Why are you blindly dumping anchors at the top with nothing to provide them semantic meaning or make them anything more than a run-on sentence?

    Basically you've got bigger problems right now than dicking around with form elements using javascript.
     
    deathshadow, Sep 24, 2013 IP
  3. al_clark7

    al_clark7 Active Member

    Messages:
    119
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    83
    #3
    Hey there,
    I can see from your posts that you are a busy member of the site, but that message was a bit harsh. At least point the poor chap/lass to a resource where they can find out more about what you are telling them. They are on here for some type of help, not an aggressive diatribe about how bad their code is. Peace
     
    al_clark7, Sep 24, 2013 IP
  4. rhoula

    rhoula Well-Known Member

    Messages:
    875
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    145
    #4
    Don't worry al-clark7. It doesn't really bother me to read posts like the one before yours. I was asking for help not a lecture on how to do things. I guess some people prefer to show they know things by putting other people down, while other help for just the sake of helping.

    By the way, I don't really know why is he talking about 1997, it doesn't seem like he/she was born then.

    Peace :)
     
    rhoula, Sep 24, 2013 IP