0
xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str,true);

Is it possible to do this?

xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str+"j="+str2,true);

I want a value to be stored in both q and j.

2
  • 1
    You're missing an &: xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str+"&j="+str2,true); Commented Jul 13, 2016 at 14:23
  • @Sirko Ahh i see thank you very much! :) Commented Jul 13, 2016 at 14:32

1 Answer 1

4

of course it is

just add an & before each additional parameter like this:

xmlhttp.open("GET","BAConsultRecordsAJAX.php?q="+str+"&j="+str2,true);

Sign up to request clarification or add additional context in comments.

3 Comments

Omg thanks, it worked! I'm pretty new to javascript's Syntax haha
@Marcus - glad I helped but you need to do some reading on the subject. it has nothing to do with javascript syntax at all. It's actually a standard http get request with parameters.
okay noted i will go read up more on it! haha because i used to do only windows based application programming. I've only recently started learning website programming.

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.