SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2005
    0 Post(s)
    0 Thread(s)

    html value passing thru form to MSaccess db

    I am having problems trying to pass html code as a value thru my dropdown box form to an msaccess db. heres what the checkbox looks like and it works fine if i put a regular text value in it like "off" etc..

    <select name="availability" tabindex="3">
    <option value="">Choose</option>
    <option value="<img src="../images/available-no.gif" width="80" height="12">">Off</option>
    <option value="On">On</option>

    does anyone know how to pass html thru a form as an option value??????

    thanks in advance.

  2. #2
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    from Madrid to Heaven
    252 Post(s)
    1 Thread(s)
    Your HTML code is not correct. Use simple quotes if you need them inside double quotes.
    If you use double quotes all the time, the program will belive that the value is "<img src=" because thinks that the ending pair is there.

    So it should be "<img src='../images/available-no.gif' width='80' height='12'>"

    This way, the program knows that the string starts with < but doesn't get confused where it ends.


Posting Permissions

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