Miko Posted August 25, 2009 Share Posted August 25, 2009 Hello, I'm a total noob if it comes to Ajax and also javascript, so that's why I come here I have this code: function getSubCat(mainCat) { createXMLHttpRequest(); var params = "titleid="+mainCat; var params = "main_cat="+mainCat; xmlHttp.open("POST", "getSubCat.php", true); xmlHttp.onreadystatechange = done; xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlHttp.send(params); } code works just fine but it will only take the var "titleid", how can I "post" both vars? Thanks 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.