0

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

1 Answer 1

1

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;
Sign up to request clarification or add additional context in comments.

2 Comments

This will not append the variable
It sure looks like it does to me @Bart.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.