Piyush Posted February 20, 2010 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]
PsaltyDS Posted February 20, 2010 Posted February 20, 2010 From MSDN: setRequestHeader Method: Quote 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
Piyush Posted February 20, 2010 Author Posted February 20, 2010 On 2/20/2010 at 3:43 PM, 'PsaltyDS said: 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]
PsaltyDS Posted February 20, 2010 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
Piyush Posted February 20, 2010 Author Posted February 20, 2010 On 2/20/2010 at 4:18 PM, 'PsaltyDS said: 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]
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