Simulating submission of form post 
Author Message
 Simulating submission of form post

Hi All,

   I am sophomore in  perl programming. I am trying to simulate a form
post submission from one cgi to another cgi that is located on another
server. I am retrieving the form in a string variable and then
displaying the contents. The problem that is occuring is that the page
that I am invoking indirectly has a body onload call which does not
get called and so the page is not displayed correctly. Is this
happening because i am simulating the form submission to this page.
Can anyone suggest a solution for this problem.

Thanx in Advance



Wed, 22 Sep 2004 02:03:50 GMT  
 Simulating submission of form post

Quote:
>I am sophomore in  perl programming. I am trying to simulate a form
>post submission from one cgi to another cgi that is located on another
>server. I am retrieving the form in a string variable and then
>displaying the contents. The problem that is occuring is that the page
>that I am invoking indirectly has a body onload call which does not
>get called and so the page is not displayed correctly. Is this
>happening because i am simulating the form submission to this page.
>Can anyone suggest a solution for this problem.

I would have thought that if you retrieved a page using CGI, then displayed
the contents in the browser, it would work exactly the same as if the
original page was displayed in the browser..

If you are just writing it to a text file or something, then any javascript
that's normally invoked, won't be run untill you view the page in a
browser...  All the CGI does it get's a copy of the page's source code, it's
up to the browser to make sense of it..

The way I see it, you are just POSTing the ouput of one script, straight to
another script right ? if so, why would you just retrieve it as a single
string and display it ?  You can access it with any normal form parsing
method, the same you would data submitted from a normal form.. e.g. use CGI
or manually read it in and dewebify with a regex and pack()..

If I'm way off here, please let me know :-)

Regards,
Chris



Wed, 22 Sep 2004 07:45:01 GMT  
 Simulating submission of form post

Quote:

> >I am sophomore in  perl programming. I am trying to simulate a form
> >post submission from one cgi to another cgi that is located on another
> >server. I am retrieving the form in a string variable and then
> >displaying the contents. The problem that is occuring is that the page
> >that I am invoking indirectly has a body onload call which does not
> >get called and so the page is not displayed correctly. Is this
> >happening because i am simulating the form submission to this page.
> >Can anyone suggest a solution for this problem.

> I would have thought that if you retrieved a page using CGI, then displayed
> the contents in the browser, it would work exactly the same as if the
> original page was displayed in the browser..

> If you are just writing it to a text file or something, then any javascript
> that's normally invoked, won't be run untill you view the page in a
> browser...  All the CGI does it get's a copy of the page's source code, it's
> up to the browser to make sense of it..

> The way I see it, you are just POSTing the ouput of one script, straight to
> another script right ? if so, why would you just retrieve it as a single
> string and display it ?  You can access it with any normal form parsing
> method, the same you would data submitted from a normal form.. e.g. use CGI
> or manually read it in and dewebify with a regex and pack()..

> If I'm way off here, please let me know :-)

> Regards,
> Chris

Hi,
 I want to simulate form post to a page,P1. This page leads me to a
successive page,P2, from which on onclick of a button i go to a third
page,P2.I donot want the page P1 to be displayed , so i am retieving
the contents of P1 in a string. I want to parse the recieved string
and  finally display only the page P3 to the user.But this doesnot
invoke javascript functions. Can anyone suggest a way to achieve this?
Is this possible through cgi scripts or should i look into any other
langauge.

Thanx in Advance
Vandhana



Thu, 23 Sep 2004 10:02:34 GMT  
 Simulating submission of form post
Quote:
> I want to simulate form post to a page,P1. This page leads me to a
>successive page,P2, from which on onclick of a button i go to a third
>page,P2.I donot want the page P1 to be displayed , so i am retieving
>the contents of P1 in a string. I want to parse the recieved string
>and  finally display only the page P3 to the user.But this doesnot

?invoke javascript functions. Can anyone suggest a way to achieve this?

Quote:
>Is this possible through cgi scripts or should i look into any other
>langauge.

Hi,
I think I know what you mean now.
1. CGI script sends POST data to a page 1.
2. Javascript on page 1 does something with the post data and sends it on.

If this is the case, it would help if you could set up an example, or at
least show the javascript that you want to execute.
Is it possible to replace the javascript with CGI ? e.g POST from one CGI
script to the next CGI script to do the same task.

Regards,
Chris



Thu, 23 Sep 2004 11:00:15 GMT  
 Simulating submission of form post

Quote:

> > I want to simulate form post to a page,P1. This page leads me to a
> >successive page,P2, from which on onclick of a button i go to a third
> >page,P3.I donot want the page P1 to be displayed , so i am retieving
> >the contents of P1 in a string. I want to parse the recieved string
> >and  finally display only the page P3 to the user.But this doesnot
>  ?invoke javascript functions. Can anyone suggest a way to achieve this?
> >Is this possible through cgi scripts or should i look into any other
> >langauge.

> Hi,
> I think I know what you mean now.
> 1. CGI script sends POST data to a page 1.
> 2. Javascript on page 1 does something with the post data and sends it on.

> If this is the case, it would help if you could set up an example, or at
> least show the javascript that you want to execute.
> Is it possible to replace the javascript with CGI ? e.g POST from one CGI
> script to the next CGI script to do the same task.

> Regards,
> Chris

Hi,
  I donot have access to the javascript code which is residing on the
server to which i am posting.I need to access the cgi on the server
and display only page P3.The first and second page is executed by the
same CGI script, the body onload function decides based on the post
parameters passed whether to display page P2 or P3.Since i am unable
to invoke the javascript function when simulating, i am unable to
access the page correctly. Hope i have made the problem clear.

Thanx
vandhana



Fri, 24 Sep 2004 05:25:22 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. How to simulate a post request ?

2. Simulating POST method w/ PERL.

3. CGI script to simulate a form submition?

4. posting the results from Form using Post or Get methods

5. using Post and Get methods for posting forms

6. POST submissions trucated, why?

7. Nonmember submission: Where and how can I post a question about

8. Win32::Internet and Forms Submission

9. LWP and https and Automating Form submission

10. WANTED: Universal PERL Form Submission Script

11. Entering ticks in checkboxes for form re-submission

12. need help with redirect after form submission.

 

 
Powered by phpBB® Forum Software