Page 1 of 1

wait message after ONCHANGE selection...

Posted: Mon Feb 07, 2011 11:14 am
by dtvonly
Hi. I have the following code:

Code: Select all

<FORM>
<SELECT ONCHANGE='location = this.options[this.selectedIndex].value;'>
<OPTION selected VALUE='stockroom.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>
My mySQL is getting larger and larger therefore the load time is getting longer and longer. How do I add a "Loading database. Please wait..." message after one of the above options is selected?
I believe I should use <div> with ONCHANGE to call a function somehow. I don't know exactly how to code this. If possible, please provide code sample. Thank you.

Re: wait message after ONCHANGE selection...

Posted: Mon Feb 07, 2011 4:09 pm
by Jade
I would suggest ajax instead. Take a look at this tutorial: http://www.nodstrum.com/2007/02/27/ajaxcontentload/