Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

Auto-Submiiting a Form Question

Hi All,
I have a page where I want it to auto-submit without the user seeing it. What is the easiest way to do this? The reason I need to do this is because the php curl function won't operate properly if I re-post the page to itself and then pass on to a Paypal page. I now have two pages set-up but as the second page is purely functional (no use to the user) I don't want them to have to click another submit button. Is there an easy php or javascript solution to this? Any help would be much appreciated.
Thanks,
D
0
dereksheahan
Asked:
dereksheahan
  • 2
1 Solution
 
TimCotteeHead of Software ServicesCommented:
Hi dereksheahan,

<body onload="document.forms[0].submit();">

So when the page loads, the form is submitted automatically.

Tim Cottee
0
 
GawaiCommented:
to work timcottee code, u should write <form> attributes as well.

<body onload="document.Autofrm.submit();">
<form action="finalpage.htm" method="post" name="Autofrm">
<input type......................>
.....

</form>
</body>



@-GaWai-@
0
 
TimCotteeHead of Software ServicesCommented:
gawai,

Indeed, though that was assumed (perhaps I shouldn't have).

Tim
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now