unemployment Posted June 13, 2011 Share Posted June 13, 2011 I want to send usernames to my ajax php script. I have these username set up as an array, but this ajax function doesn't work for me. Do you know why? var users_list = document.getElementsByName('with_username[]'); ajax.get('/assets/ajax/pm_autosuggest.php?info=' + info + '&list' + users_list, function (resp) { var search = eval('(' + resp + ')'); fill_list(search); }); Quote Link to comment Share on other sites More sharing options...
gizmola Posted June 14, 2011 Share Posted June 14, 2011 The typical solution is to use json, which is a data structure that both php and javascript can work with. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.