Piyush Posted February 20, 2010 Share Posted February 20, 2010 How to post data with xmlhttp. I tried it...but an error occured.. i tried this... $obj=ObjCreate("Microsoft.XMLHTTP") $obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded') $obj.open("POST","localhost",False) $obj.send("name=piyush") MsgBox(0,"",$obj.responsetext) this error was shown by autoit $obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded') $obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded')^ ERROR am i going wrong in something... Thx. [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 20, 2010 Share Posted February 20, 2010 From MSDN: setRequestHeader Method: setRequestHeader was introduced in Windows Internet Explorer 7.What version of IE are you running? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Piyush Posted February 20, 2010 Author Share Posted February 20, 2010 From MSDN: setRequestHeader Method: What version of IE are you running?i am using internet explorer 8.,,,please try to rin my script in your computer.and tell me whethrt it works in your comp or not.may be there may be something missing in my computer.... [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] Link to comment Share on other sites More sharing options...
PsaltyDS Posted February 20, 2010 Share Posted February 20, 2010 Ah, do .open before setting the properties: $obj=ObjCreate("Microsoft.XMLHTTP") $obj.open("POST","http://www.autoitscript.com",False) $obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded') $obj = 0 Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Piyush Posted February 20, 2010 Author Share Posted February 20, 2010 Ah, do .open before setting the properties: $obj=ObjCreate("Microsoft.XMLHTTP") $obj.open("POST","http://www.autoitscript.com",False) $obj.setRequestHeader('Content-Type','application/x-www-form-urlencoded') $obj = 0 thanks...now it is working... [font="Comic Sans MS"][size="7"]Piyush.....[/size][/font][font="Palatino Linotype"][size="2"]Some Of My Scripts...Cool Font Generator Train Searcher and Tracer[/size][/font] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now