By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,608 Members | 1,940 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,608 IT Pros & Developers. It's quick & easy.

where does the & go LOL

P: 15
ok this is the javascript

Expand|Select|Wrap|Line Numbers
  1. <script type="text/javascript">
  3.     var options = {
  4.         script:"test.php?json=true&limit=6&one="+document.getElementById('oneone').value,
  5.         //script:"test.php?json=true&limit=6&",
  6.         varname:"input", 
  7.         json:true,
  8.         shownoresults:false,
  9.         maxresults:6,
  10.         callback: function (obj) { document.getElementById('testid').value =; },
  12.     };
  13.     var as_json = new bsn.AutoSuggest('testinput', options);
  15. </script>
ok now no with this code not commented out i get

Expand|Select|Wrap|Line Numbers
  1. script:"test.php?json=true&limit=6&one="+document.getElementById('oneone').value,
i get the value of oneone in firebug test.php?json=true&limit=6&one=s_city

when i comment that out and put in
Expand|Select|Wrap|Line Numbers
  1. script:"test.php?json=true&limit=6&",
i get test.php?json=true&limit=6& varname=input

what i am asking is i know (well i think)i need a & in the first little section of code so i keeps adding the var name to the url .

please help thanks
Nov 1 '09 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 5K+
P: 5,390
what JavaScript framework do you use? it seems like a misuse of the api of a XMLHttpRequest ... I think the params should be added another way ...

kind regards
Nov 10 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.