Related dropdown using javascript and php

sevenup

New Member
I have this script and I want to get the value of drop down select list in the PHP and check the if (jws1 != "") then show 1 to 10 value in the second drop down box using of for loop...JavaScript code:\[code\]<script language="javascript" type="text/javascript"> function test(){var e = document.getElementById("JWSections");var Sections = e.options[e.selectedIndex].value;alert(Sections);}</script>\[/code\]HTML code:\[code\]<select name="JWSections" id="JWSections" onchange="test();"> <option value="">Select Sections</option> <option value="http://stackoverflow.com/questions/12816403/jws1">Section 1.1</option> <option value="http://stackoverflow.com/questions/12816403/jws2">Section 1.2</option> <option value="http://stackoverflow.com/questions/12816403/jws3">Section 1.3</option> <option value="http://stackoverflow.com/questions/12816403/jws4">Section 1.4</option></select>\[/code\]I want to get the value like jws1, and check in the PHP.
 
Back
Top