Form in form?

E

Edwin Knoppert

I sometimes have the need to call other websites using POST.

most of the times i can make it to work bbut in this case it becomes harder.

I have a masterpage and a particular page needs to submit some hidden data
via POST.
Since the FORM tags are inside the page and trhus enclosed in the form tags
of the masterpage i get unstable behaviour.

What should i do.
It's a bit of problem to put the form at the end of the source, unless i
dump it at the end via some asp.net register function???

I don't need another solution, i simply need to post some data to another
webserver, the result is a file download.
But if not i use target to get me a new popup.
The client does the post, not the server.
 
B

bruce barker \(sqlwork.com\)

you can use a hidden frame. note as browser security advances, this approach
should not work as cross site posting should not be allowed by the browser.

-- bruce (sqlwork.com)
 
E

Edwin Knoppert

That pretty much s**s

Here is my 'solution':

<script language="javascript">
function MyFunction()
{
var x = document.forms[0];
var sOldAction = x.action;
var sOldTarget = x.target;
x.action = "http://www.the target website here.com";
x.target = "_blank";
document.forms[0].submit();
x.target = sOldTarget;
x.action = sOldAction;
}
</script>

Of course, more data is posted but that doesn't matter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Registration Form 7
Responsive form 0
Registration form 13
Mailbox form automation 0
A simple form question 2
Change form action 0
Login form no longer working 2
Php modal form to email 1

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top