Background Posting Of Form Data

Results 1 to 2 of 2

Thread: Background Posting Of Form Data

  1. #1
    David Hundley Guest

    Default RE: Background Posting Of Form Data

    Even though I submitted this post, I have not seen it on ANY of the message boards so I wonder if anyone ever saw it. The only way I was able to bring it up was to do a search by author&#039s name. What exactly does it take to get posted? I felt as though I thouroughly documented my post as requested.<BR><BR>Regardless, I wanted to follow up with the results of more reasearch and testing. I was able to get the post to go through using the ASPTear product. I don&#039t believe it was so much their product is better but rather that their documented example including the piece of the puzzle I was missing. Prior to calling the method they included the following statement: <BR><BR>Response.ContentType = "text/html"<BR><BR>and they encoded the data to be posted inside the following:<BR><BR>Server.URLEncode(myfield=myvalue )<BR><BR>None of the others showed any of this. Now my only problem is with checking the Response property following the Retrieve method. I am getting a 438 "Object does not support this property" message but the documentation I found on the internet lists Response as a property of the ASP Tear object. Any ideas?<BR><BR>Also does anyone know why the website seems to be down for such an extended period of time.<BR><BR>David

  2. #2
    David Hundley Guest

    Default Background Posting Of Form Data

    I am trying to post form data from an ASP page in my application to a CGI script running on a remote server while keeping the user within my application (i.e. I don&#039t want them to see the CGI script page - I want to redirect them to another page such as a confirmation page within my app). I also want to test that an HTTP 200 OK status code was returned from the CGI script&#039s server to determine the next action my app will take.<BR><BR>The relevant portion of my code looks like this:<BR><BR>&#060;%@ Language=VBScript %&#062;<BR>&#060;%<BR>Sub TakeAction()<BR> dim objInet<BR> dim strPage<BR> dim Action<BR><BR> If Len(Request.Form(Action)) &#062; 0 Then &#039 This page is being called from itself<BR> Action = Cstr(Request(Action)) <BR> Else &#039 This is the first time through<BR> Action = ""<BR> End If<BR><BR> Select Case Action<BR> Case "POST"<BR> Set objInet = Server.CreateObject("asphttp.conn")<BR> with objinet<BR> .Url = ""<BR> .PostData = cstr("myfieldname=" & Request.Form("myfieldname"))<BR> .RequestMethod = "POST"<BR> strPage = .GetURL<BR> end with<BR> response.redirect("nextpage.asp")<BR> Case Else<BR> &#039- Entering form for the first time<BR> End Select<BR>End Sub<BR><BR>&#039=========================== <BR>&#039= Main Process Flow Section<BR>&#039===========================<BR>Cal l TakeAction()<BR>%&#062;<BR><BR>&#060;HTML&#062;<BR >&#060;HEAD&#062;<BR>&#060;SCRIPT language="JavaScript"&#062;<BR>&#060;!--<BR> function execMenuCommand {<BR> document.myformname.submit();<BR> }<BR>//--&#062;<BR>&#060;/SCRIPT&#062;<BR>&#060;/HEAD&#062;<BR>&#060;FORM name="myformname" action="thispage.asp" method="Post"&#062;<BR> &#060;input type="hidden" name="Action" value="POST"&#062;<BR> &#060;table&#062;<BR> &#060;TR&#062;<BR> &#060;TD colspan="2" height="30" align="right" valign="center"&#062;<BR> &#060;input type="hidden" name="myfieldname" value="myvalue"&#062;<BR> &#060;INPUT type="button" value="Submit" name="cmdSubmit" onClick="execMenuCommand"&#062;<BR> &#060;/TD&#062;<BR> &#060;/TR&#062;<BR> &#060;/table&#062;<BR>&#060;/FORM&#062;<BR>&#060;/HTML&#062;<BR><BR>On the line which reads Set objInet = Server.CreateObject("asphttp.conn") I have also used "InetCtls.Inet.1" (Microsoft&#039s ITC) and "SoftArtisans.XFRequest" along with the appropriate properties and methods between the With and End With statements. All seem to have the same problem which is:<BR><BR>I am getting an operation timed out error message after the 20 second interval has elapsed. However, when I change my code to bypass the dll and simply post from the form it takes less than a second to complete so I know its not a server or a timing problem.<BR><BR>I submitted it to the microsoft.public.scripting.vbscript newsgroup and no one provided the answer within a day.<BR><BR>I checked my configuration and I am runing NT 4.0 with SP5, IE 5.0 <BR><BR>I&#039ve read the WinInet API section of the MSDN Library that was installed with Visual Studio 6.0. I&#039ve read most of MSDN Web Workshop tutorials that relate to this problem. I have consulted with several colleagues who have extensive ASP backgrounds. I have used AltaVista and read every article that seemed even remotely related to WinInet and the Internet Transfer Control. I&#039ve been at this for about three weeks now.<BR><BR>I have spent many hours and read the following Microsoft KB documents Q238425, Q174574, Q167706, Q216288, Q165298, Q168208, Q182152, Q188955 (to name just a few) and I still can&#039t solve this.... Does anyone have any ideas? <BR><BR>I have tried trial demos downloaded from (aspHTTP) and (Xfile) without success<BR><BR>I am trying to find out all the facts about posting ASP form data behind the scenes. I searched the web and found zilch. I own the following books "ActiveX and VBScript" and "Active Server Pages: How To" but need more info. Does anyone know of some other resources? <BR><BR>David

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts