where does the & go LOL

Discussion in 'JavaScript' started by DigitalFTW, Nov 1, 2009.

  1. #1
    ok this is the javascript

    
    <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>
    
    Code (markup):
    ok now no with this code not commented out i get

    
    script:"test.php?json=true&limit=6&one="+document.getElementById('oneone').value,
    
    Code (markup):
    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
    
    script:"test.php?json=true&limit=6&",
    
    Code (markup):
    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
     
    DigitalFTW, Nov 1, 2009 IP