|
|
#1 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,542 posts
Gave thanks: 91
Thanked 49 times
|
How to go about...
Well, I've come to yet another thing that I wish to do that was well is limited to me at the moment. I'm wondering if there is an javascript for this... anyways...
I have a form abd a iframe. Now this form submits text data into this iframe. However, once complete the text is still in the input field. Is there some sort of java to clear the text input field on submission? Another thing. I have a refresh button that is in the same form. What would be the "onclick" command to have it refresh what is in the iframe? Thanks guys, once my site is bug free, I'll link to it... somehwere... that is allowed :P
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
|
|
#2 (permalink) |
|
after g, before i
Resident.
Joined in Jul 2004
Hosted on Gojira
8,027 posts
Gave thanks: 48
Thanked 129 times
|
You should be able to do something like this in JavaScript to clear a form element.
Code:
document.getElementById('formElementID').value = '';
If you want a button that clears or resets a form, you could just use : Code:
<input type="reset" name="reset" value="reset" /> |
|
|
|
|
|
#3 (permalink) |
|
Surpass Fan
Excelling Contributor
Joined in Nov 2005
Lives in Colorado
Hosted on DEDI
934 posts
Gave thanks: 2
Thanked 94 times
|
Make the last line of the script doing the submitting, redirect to itself with a location statement. That will clear the fields and, also, the post variables, should a refresh be attempted. If you want your refresh button to clear all the fields, make your onclick= the same location statement used above.
__________________
Where would you be if you were at the highest court in the land (US)? |
|
|
|
|
|
#4 (permalink) |
|
Bow before Surpass!
Super #1
Joined in Sep 2004
1,542 posts
Gave thanks: 91
Thanked 49 times
|
Nah, the 2nd thing with the button was the refresh the iframe, not form. Anyways, thank you, it's been cleared now
About to post another, yet simple, question.,..
__________________
Wii Hotspot - Upcoming project! -http://www.wiihotspot.com
Make a cPanel Login Form | Why is my Account Suspended? |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|