Click to See Complete Forum and Search --> : xmlhttprequest passing vars in post-need help!!


soldierdog
05-10-2005, 12:31 PM
Hello,

I have my main cgi script called manager.cgi which uses xmlhttpreq to call on default_ne.cgi and add.cgi to fill in two divs.

The problem is that when I post using req.open("POST", url, true); regadless of what information I place in the url such as http://project1.vianet.ca/add.cgi?uname=jack&pwd=frost it is not passing the variables to add.cgi .

However if I just paste the above in my browser, it passes the variable. I believe it has something to do with the "main" page being mangage.cgi, it almost seems as though it has to run through apache as the "main" page script. Anyhow, I'm not sure how to solve this. Any help would be appreciated.


--Leander

soldierdog
05-10-2005, 01:00 PM
Ok,

So I figured out that I am trying to post within the script by using the get method which is why it worked by typing it manually.

Now that I know this, I would like to know how to tell xmlhttpreq how and what info to post. I don't know how.

--Leander