aeroswat Posted February 16, 2010 Share Posted February 16, 2010 What is wrong with this?! It's not getting to the alert(1) function updateForm(ctrl) { var ss = ctrl.value; alert(ss); $.ajax({ type: "POST", url: "lookup-systeminfo.php", data: "ss="+ss+"", async: false, success: function(msg){ alert('1'); var msg=msg.substr(0,msg.search("#STOP#")); alert('2'); if(msg.length >0) { alert('3'); alert('got here'); msg.split(";"); document.GetElementById('sysName').value = msg[0]; var Acc=document.GetElementById('Account'); Acc.selectedIndex = Acc.options.indexOf(msg[1]); var Reg=document.GetElementById('Region'); Reg.selectedIndex = Reg.options.indexOf(msg[2]); var Adu=document.GetElementById('Adult'); Adu.selectedIndex = Adu.options.indexOf(msg[3]); document.GetElementById('Reallocations').value = msg[4]; } } }); } Quote Link to comment https://forums.phpfreaks.com/topic/192306-im-pulling-my-hair-out-trying-to-figure-this-out/ Share on other sites More sharing options...
aeroswat Posted February 16, 2010 Author Share Posted February 16, 2010 zzz... I didn't include my jquery library but setting the selected index to the values is proving rather difficult. Anyone know how to do this. Also just for an update i fixed the capitalization on the getElementById Quote Link to comment https://forums.phpfreaks.com/topic/192306-im-pulling-my-hair-out-trying-to-figure-this-out/#findComment-1013371 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.