HowTo get the submited POST string?

D

dk9

I need to know what a page is returning in the Post arguments.

Something like:

<form name="myform" onsubmit="alert(document.myform.values)">
<input name="name">###
<input name="address">###


It will show:
"&name=Steve&address=Avenue25"


Thanks for any help
 
E

Evertjan.

dk9 wrote on 08 dec 2007 in comp.lang.javascript:
I need to know what a page is returning in the Post arguments.

'need' read 'want'/'would like'?

Something like:

<form name="myform" onsubmit="alert(document.myform.values)">
<input name="name">###
<input name="address">###


It will show:
"&name=Steve&address=Avenue25"

<script type='text/javascript'>

function alertMe(f){
var e = f.elements,t='';
for (var i=0;i<e.length;i++)
if (e.type=='text')
t+= e.name+'='+e.value+'&';
alert(t);
};

</script>

<form onsubmit='alertMe(this)'>
<input name='name'><br>
<input name='address'><br>
<input type='submit'>
</form>
 
E

Evertjan.

dk9 wrote on 08 dec 2007 in comp.lang.javascript:
Thank you for your help

That was just what I needed and wanted :)

Could be, but we don't know what and whom you are replying on.

[please always quote on usenet]
 

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

Members online

No members online now.

Forum statistics

Threads
474,147
Messages
2,570,833
Members
47,380
Latest member
AlinaBlevi

Latest Threads

Top