Results 1 to 4 of 4

Thread: Problem getting inch and feet characters from form values

  1. #1
    Join Date
    Sep 2010

    Problem getting inch and feet characters from form values

    I'm creating a form where basketball coaches can enter their teams roster and then that gets sent to a database which then appears on the rosters page of the site.

    My problem is where they select the players height. I don't want them to enter it as text manually as I want this to be consistent across all rosters, example: 6' 3"

    So I decided to give them a drop down menu to select the height. I go from 4' 0" all the way up to 7' 3".

    But I'm pretty sure I can't use this:

    <select name="height" >
    <option value="4' 8"">4' 8"</option>

    Not sure how to get the foot character and inch character to appear correctly in the results.

    Thanks for any help

  2. #2
    Join Date
    Nov 2012
    Inches will be: &#34;
    Feet will be: &#39,
    Hope this helps! Best to you!

  3. #3
    Join Date
    Mar 2011
    You need to escape (encode) the quotation mark in the <option> tag so that the browser knows that you mean to include it in the value and not the end of it. Just precede the quotation mark with a backslash, as in:
    <option value="4' 8\"">4' 8"</option>
    Rick Trethewey
    Rainbo Design

  4. #4
    Join Date
    Sep 2010
    Thanks very much guys, got it to work!

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