sferguson
11-14-2003, 10:35 AM
I have a javascript function which calls an .asp and submits a form. I have been trying to get this to work through AMS5 with the HTTP class, with no luck. Someone who has more experience with HTTP in general may be able to offer guidance to a relative newbie. Let me start with even a more simple example:
I can paste the following URL into my browser, which works great. (It won't work for you because you have to log into the system first, but you get the idea.) Here it is:
http://66.88.18.69/rbweb/reporter/RT_M01_S03.asp?jobno=94648&comtype=1
Here's my AMS5 code, which I assume should be doing the same thing:
tabAuth = {Username="XXXXX", Password="XXXXX"};
errPing = HTTP.TestConnection("http://66.88.18.69/rbweb/reporter/RT_M01_S03.asp", 20, 80, tabAuth, nil);
result = HTTP.Submit("http://66.88.18.69/rbweb/reporter/RT_M01_S03.asp", {jobno="94648", comtype="1"}, SUBMITWEB_POST, 20, 80, tabAuth, nil);
The test connection is coming back successful, but I'm getting Error 2527 ("Failed to submit to Web - Error code returned by server.") when running the submit. Is there something I'm missing? Any help much appreciated.
I can paste the following URL into my browser, which works great. (It won't work for you because you have to log into the system first, but you get the idea.) Here it is:
http://66.88.18.69/rbweb/reporter/RT_M01_S03.asp?jobno=94648&comtype=1
Here's my AMS5 code, which I assume should be doing the same thing:
tabAuth = {Username="XXXXX", Password="XXXXX"};
errPing = HTTP.TestConnection("http://66.88.18.69/rbweb/reporter/RT_M01_S03.asp", 20, 80, tabAuth, nil);
result = HTTP.Submit("http://66.88.18.69/rbweb/reporter/RT_M01_S03.asp", {jobno="94648", comtype="1"}, SUBMITWEB_POST, 20, 80, tabAuth, nil);
The test connection is coming back successful, but I'm getting Error 2527 ("Failed to submit to Web - Error code returned by server.") when running the submit. Is there something I'm missing? Any help much appreciated.