troubleshooting Question

javascript url construction

Avatar of prk_usa
prk_usa asked on
JavaScript
7 Comments1 Solution323 ViewsLast Modified:
Hi All,

Thanks to everybody , for helping me out , in solving lot of issues.Today I have one more issue, i.e,
I am passing a parameter  to a jsp using javascript as shown below and I am also  showing you jsp code  for onChange handler:
When a user changes value on the drop down , function "showselected" will be activated and it will pass values to other jsp , from script tag:

functionon showSelected(obj)
 {
            var idx = obj.selectedIndex;
            var selectedvalue=obj[idx].text;
document.getElementById('dd_iframe').src='/forms/fields/dynamiclist_serverside.jsp?var='+selectedvalue+'&'+'selectedfield='+<%=field.getName()%>; return   false;
  }
 </script>
<select id ='dd_<%=formField %>_sel' name='<%=formField%>' value='<%=curVal%>' onChange="showSelected(this)">
when my code is like this ,passing one parameter only ,it's working fine:
document.getElementById('dd_iframe').src='/forms/fields/dynamiclist_serverside.jsp?var='+selectedvalue; return   false;
when I want to add one more parameter to this as shown below it's not working :
document.getElementById('dd_iframe').src='/forms/fields/dynamiclist_serverside.jsp?var='+selectedvalue+'&'+'selectedfield='+<%=field.getName()%>; return   false;
it's not working ,
I hope I am clear
can you guys help me out in solving this.
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros