Reputation: 453
I am calling a url from javascript. I want to append my javascript variable as a parameter.
I tried following but its not working. The name is the parameter that has issue
var name='myName';
var url = '<%=request.getContextPath()%>/wizards/script/add_script_wizard1.faces?organizationKey=<%=request.getAttribute("organizationKey")%>& name=+name+';
Please help
Upvotes: 0
Views: 1181
Reputation: 719
Get rid of the space between the ampersand and the variable name 'name'
var name='myName';
var url = '<%=request.getContextPath()%>/wizards/script/add_script_wizard1.faces?organizationKey=<%=request.getAttribute("organizationKey")%>&name='+name;
Upvotes: 1