This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
I have 4 combo boxes where the second and third combo box values depend on the first combo box value and third combo box value depend on the second.I am able to write the code for the first half but struggling to write for the second half.
function getpname() { window.location="project.jsp?pid="+document.frm.pid.options[document.frm.pid.selectedIndex].text; } The above code is running fine. But there is some problem in the following code that i am unable to understand.
function getsname() {window.location="project.jsp?module="+document.frm.module.options[document.frm.module.selectedIndex].text; } All the combo boxes are in the same jsp page. Please tell me how to use the conditional operator(?) with window.location. Please solve this.Thank you.
The ? is not a conditional operator(i guess, you are confusing it with Java's conditional operator). Anything following the ? in the query string represents the parameter key-values that are being passed as part of the URL. In this case, a parameter with the name 'module' is being passed a value evaluated out of the expression document.frm.module.options[document.frm.module.selectedIndex].text.