New Message on dotNET User Group Hyd

Great Functionality in _javascript_

Reply
  Reply to Sender   Recommend Message 2 in Discussion
From: jiTcOdEr

Following code should help you:

<form name=NF>

language="_javascript_">

var NA1 = new Array ("1", "Subcat 1_1", "2", "Subcat 1_2", "3", "Subcat 1_3");
var NA2 = new Array ("1", "Subcat 2_1", "2", "Subcat 2_2", "3", "Subcat 2_3");

function LoadSubCats(X)
{

var Z = document.NF.SCID;

if (X.selectedIndex == 0)
{
Z.length = 1;
Z.options[0].text = "";
Z.options[0].value = "";
}
else
{
var O = eval ("NA" + X.options[X.selectedIndex].value);
Z.length = O.length/2;

var A = 0;

for(Y=0; Y<O.length; Y+=2)
{
Z.options[A].value = O[Y];
Z.options[A].text = O[Y+1];
A++;
}
}
}

</SCRIPT>

Category:

<select name=CID >
<option value=""></option>
<option value="1">Category 1</option>
<option value="2">Category 2</option>
</select>

Sub Category:

<select name=SCID></select>

</form>

Cheers!!
Kiran


View other groups in this category.

Click Here
Also on MSN:
Start Chatting | Listen to Music | House & Home | Try Online Dating | Daily Horoscopes

To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings.

Need help? If you've forgotten your password, please go to Passport Member Services.
For other questions or feedback, go to our Contact Us page.

If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list.
Remove my e-mail address from dotNET User Group Hyd.

Reply via email to