Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    Dec 2010
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Hide the values in a select / option drop down

    Here is a simple select option list:

    Code:
    <select name="Department" id="Department">
    <option value="" selected="selected">Select a department &nbsp; </option>
    <option value="PA">Building Services</option>
    <option value="MOC">MOC </option>
    option value="P">Contracted Provider</option>
    </select>

    I want to hide the value= from someone doing a 'view source' on the page.

    Can this be done?

  • #2
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    Can this be done?
    Impossible!
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • #3
    New Coder
    Join Date
    Dec 2010
    Posts
    17
    Thanks
    2
    Thanked 0 Times in 0 Posts
    What do you suggest I do to mask those values?

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,801
    Thanks
    160
    Thanked 2,216 Times in 2,203 Posts
    Blog Entries
    1
    You may use numeric values their and reconstruct the required values from the server side , based on the submitted values.
    Code:
    <select name="Department" id="Department">
    <option value="0" selected="selected">Select a department &nbsp; </option>
    <option value="1">Building Services</option>
    <option value="2">MOC </option>
    option value="3">Contracted Provider</option>
    </select>
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)


  •  

    Posting Permissions

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