Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automaited transfer of data via POST not GET

Status
Not open for further replies.

BarryMVS

IS-IT--Management
Apr 17, 2003
172
GB
Hi,

I need to move some data from one page to the next.

I can not use Cookies or the GET transfer option.

I need to do it using something like the Meta tag that refreshes a page.

Does anyone know how to do this, but POST the data, not add it to the URL after a ? (GET transfer).

Any help most welcomed.

Thanks,

Barry

ICT Network Administrator
IT Services Manager
 
Build yourself a copy of the form on the page and submit it to the URL. It need not actually LOOK like the original form, it just needs to have the same field names and values that the original form expects. You can even use hidden fields for most of them. You can also set the style of the form itself to hidden so it won't be displayed, but can still be filled by your code.



Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
tsdragon,

Sorry if this sounds silly, but how do I automatically submit the form?

Cheers,

Barry

ICT Network Administrator
IT Services Manager
 
[tt]document.forms['formname'].submit();[/tt]

Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
OK, thanks.

I'll give it a try.

Cheers,

Barry

ICT Network Administrator
IT Services Manager
 
Also note that if the original form has an onSubmit function, it will not be called, as you are completely bypassing the original. If that's the case, you'll have to figure out what the onsubmit function does and duplicate its' functionality.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Tracy,

Thanks for your assistance.

I have done as you suggested and it works great.

Cheers,


Barry

ICT Network Administrator
IT Services Manager
 
You're quite welcome. Glad I could be of assistance.


Tracy Dryden

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard. [dragon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top