|
-
February 24th, 2003, 03:08 AM
#1
Clearing text boxes
I was trying to figure out how to clear out the information someone has filled into a series of textboxs after they click the submit button.
another words, they data the entered has been put in a database and I don't want the person to have the option of clicking submit again.
thanks
guyute
-
March 2nd, 2003, 12:42 AM
#2
What might be a simplistic manner and their would possibly be a better manner of doing this, but I would just set the text box being equal to nothing within the code of the submit button.
If submit button code has executed correctly,
textbox.text = ""
else
do so form of an error message.
end if
This has worked fine for me, it is just that it is extremely tedious if you have many text boxes.
-
March 2nd, 2003, 03:52 AM
#3
thank you for replying, but i still don't quite understand. how do i code "If submit button code has executed correctly"
is there a way to see if the database has been contacted, or if they textbox's have been loaded into variables? possible some type of boolean?
or maybe i'm just missing something, need to stop drinking so much.
thanks for answering.
guyute
-
March 2nd, 2003, 03:32 PM
#4
You can do something like this:
PHP Code:
// user pressed the submit button
if(submit.count>0)
{
// check whether user has entered something in the textfield
if(textfield.Text=="") // textfield is empty
do something....
else
do something else... // textfield is not empty
}
Hope this helps, Sonu
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|