I presume you mean populating a select box without refreshing the page from the 
server? Here are the bare bones of the javascript to do the job.

Start with an empty box:
<FORM NAME="myform" METHOD="POST" ACTION="whatever">
<SELECT NAME="myselection" SIZE=1>
<OPTION VALUE="">Select your drink</OPTION>
</SELECT>
</FORM>

Then use the following javascript to increase the number of options and 
populate them (normally you would store these values in an array and loop over 
it):

document.myform.myselection.length = 4;
document.myform.myselection.options[1].value = "Margarita";
document.myform.myselection.options[1].text = "Margarita";
document.myform.myselection.options[2].value = "Pina Colada";
document.myform.myselection.options[2].text = "Pina Colada";
document.myform.myselection.options[3].value = "Vodka Lime";
document.myform.myselection.options[3].text = "Vodka Lime";

You can also fetch these options from the server using remote scripting. 

Regards: Ayudh

+----------------------------------------------------------------+
| SOAP is the glue! Hook up your server directly to your bank.   |
| Connect to VeriPay xServ, the Australian Payments Web Service. |
| Reliable, Secure, FAST: http://www.xilo.com/xserv              |
+----------------------------------------------------------------+

        

---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to