EllisLab text mark
Advanced Search
     
how to get the value of textfield in variable on same page
Posted: 03 January 2009 08:20 AM
Joined: 2008-12-17
2 posts

how to get the value of textfield in variable on same page?

 
Posted: 03 January 2009 11:20 AM   [ # 1 ]   [ Rating: 0 ]
Joined: 2008-06-11
64 posts

Do you mean the value of a textfield in javascript variable?

 
Posted: 03 January 2009 01:28 PM   [ # 2 ]   [ Rating: 0 ]
Joined: 2007-11-08
237 posts

First of all, wrong forum.

If you mean the value of a form text field then you can access it with Javascript, look at some jQuery tutorials to help you understand how to use it.

 Signature 

Redux Auth is no longer maintained.

 
Posted: 03 January 2009 01:37 PM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-03
22 posts

Or you can have some PHP above everything in your page, set a variable with a default value of null. Send the form to the same page, if it has a value add it to the variable, if not continue as normal.

You could also reset the form action upon setting the variable.

My code is messy but the logic is there.