|
Subject:
|
changing content depending on combo box value
|
|
Posted By:
|
bewise
|
Post Date:
|
2/7/2006 11:45:52 AM
|
Hi all, just wondering if any1 know how i could do the following:
display different content depending on the value of a combo box. The content should be displayed automatically after the value of the combo box is choosen.
Cheers
|
|
Reply By:
|
ziafrombd
|
Reply Date:
|
9/13/2006 11:57:15 AM
|
Hi, I am a new commer, and late commer also, I think. Anyway, the problem you are saying about, I think, is the jump menu. I usally do it by javascript. Here is the script below. Put this script in the header within a script tag.
function jumpMenu(targ,selObj,restore){ eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; }
Here is the HTML code for menue.
<form> <select name="menu1" onchange="jumpMenu('parent',this,0)"> <option value="0">Select</option> <option value="index.php">Index</option> <option value="product.php">Product</option> <option value="price.php">Price</option> </select> </form>
Please let me know whether it works.
Regards, Zia.
|