where does the & go LOL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bytesFTW99
    New Member
    • Nov 2008
    • 15

    #1

    where does the & go LOL

    ok this is the javascript

    Code:
    <script type="text/javascript">
    
    	var options = {
    		script:"test.php?json=true&limit=6&one="+document.getElementById('oneone').value,
    		//script:"test.php?json=true&limit=6&",
    		varname:"input", 
    		json:true,
    		shownoresults:false,
    		maxresults:6,
    		callback: function (obj) { document.getElementById('testid').value = obj.id; },
    		
    	};
    	var as_json = new bsn.AutoSuggest('testinput', options);
    
    </script>
    ok now no with this code not commented out i get

    Code:
    script:"test.php?json=true&limit=6&one="+document.getElementById('oneone').value,
    i get the value of oneone in firebug test.php?json=t rue&limit=6&one =s_city

    when i comment that out and put in
    Code:
    script:"test.php?json=true&limit=6&",
    i get test.php?json=t rue&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
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    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

    Comment

    Working...