I am trying to get this url that is based on a few form values that are pulled in via variables to be the action of a form, with no luck... it seems that I am having trouble with #1 the variable based portion of the url monster being included twice like this:
http://api.simplyhired.com/a/jobs-api/xml-v2/q-Billing&l-?l=&q=Billing
or
if i remove the question mark from the url i get:
see how that last bit just keeps getting repeated?
I am fairly new to javascript and I know that the ? is the thing that is screwing me up, but I need it in the url to make it work, so i guess what i need to know is how to write this in such a way as to include the question mark and not have it screw up the way the url is being output.
Thank you so much in advance, I have been trying to figure this out for hours.
edit
function earl() {
var q=document.f_widget_job_search.q.value;
var l=document.f_widget_job_search.l.value;
document.getElementById('f_widget_job_search').action;
document.getElementById('f_widget_job_search').action = ("http://api.simplyhired.com/a/jobs-api/xml-v2/q-"+q+"&l-"+l+"\?pshid=55414&ssty=2"+"&cflg=r"+"&jbd=doors.jobamatic.com"+"&clip=38.98.177.132");
}
<form id="f_widget_job_search" name="f_widget_job_search" class="search_form" onSubmit="javascript:earl()">
<select id="q" name="q">
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
</select>
<input id="l" name="l" type="text">