Adding message to <Select Onchange=...">

Discussion in 'PHP' started by dtvonly, Feb 3, 2011.

  1. #1
    Hi. Please see the code below:
    
    <FORM>
    <SELECT ONCHANGE='location = this.options[this.selectedIndex].value;'>
    <OPTION selected VALUE='index.html'>Choose An Option Below...</option>
    <OPTION VALUE='quantity_search.php'>Search By Quantity</option>
    <OPTION VALUE='location_search.php'>Search By Location</option>
    <OPTION VALUE='parttype_search.php'>Search By Part Type</option>
    <OPTION VALUE='manufacturer_search.php'>Search By Manufacturer</option>
    <OPTION VALUE='sf_partnum_search.php'>Search By Surefire Part Number</option>
    <OPTION VALUE='partnum_search.php'>Search By Manufacturer Part Number</option>
    <OPTION VALUE='description_search.php'>Search Keyword(s) In Part Description</option>
    <OPTION VALUE='viewall.php'>View Entire Database Content</option>
    <OPTION VALUE='part_location.php'>Enter New Part Information</option>
    </SELECT>
    </FORM>
    
    HTML:
    Since mySql database is getting larger and accessing time is getting longer, how do I add a message "Accessing database. Please wait..." once the user had made a selection (above), ?

    Thank you.
     
    dtvonly, Feb 3, 2011 IP
  2. moads

    moads Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    You'll have to create a div for the output message and create a function that is called ONCHANGE.
     
    moads, Feb 3, 2011 IP
  3. dtvonly

    dtvonly Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    could you give me a sample code? thanks.
     
    dtvonly, Feb 3, 2011 IP