General discussion

Locked

get value of a form variable on same asp page

By Linesh.Patankar ·
Hi there,

I have an asp page where a form uses action="post", which gets values for 2 variables in form in text box from user. How do I access those values in the same asp page after user submits response values ? Any ideas ?

Best Regards

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by Tony Hopkinson In reply to get value of a form varia ...

You can access them any time through the DOM, you'll have to code an event to detect the submit though.

Collapse -

by Tony Hopkinson In reply to get value of a form varia ...

Oops this will be javascript on the html page the asp outputs though.
Obviously at the time the page is produced the values are what ever they were set to in the HTML Form code. To get the asp to produce different output after submit you would have to save the posted values in the asp script you posted them to and then refresh the calling page reading the saved values.
If you were talking say show the posted values that were last pasted the the uual way is to put them into a cookie on the page they are posted to and then read it on the page they are posted from.

Collapse -

by jyoti.rtk In reply to get value of a form varia ...

use document.formname.fieldname.value
to access the text box value in same page with javascript code

Back to Web Development Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums