|
-
Oct 27th, 2003, 12:21 PM
#1
Thread Starter
Hyperactive Member
Change Submit Button's Caption- Javascript -[RESOLVED]
I'm looking for a way to change a submit button's caption as soon as it is clicked.
I want to disable it and make it say "Searching"
I can do the disable
Code:
<!-- Begin Disable submit button
function disableForm(theform)
{
if (document.all || document.getElementById)
{
for (i = 0; i < theform.length; i++)
{
var tempobj = theform.elements[i];
if (tempobj.type.toLowerCase() == "submit")
{
tempobj.disabled = true;
}
}
return true;
}
}
// End Disable submit button-->
but not the caption change.
Can anyone help?
Thanks!
Last edited by rockies1; Oct 27th, 2003 at 12:50 PM.
-
Oct 27th, 2003, 12:37 PM
#2
Code:
function disableForm(theForm) {
if (document.all || document.getElementById)
{
for (i = 0; i < theform.length; i++)
{
var tempobj = theform.elements[i];
if (tempobj.type.toLowerCase() == "submit")
{
tempobj.disabled = true;
tempobj.value = "Searching";
}
}
return true;
}
}
-
Oct 27th, 2003, 12:49 PM
#3
Thread Starter
Hyperactive Member
That was awesome, thank you!!
I'm new to JavaScript, so I appreciate the help when I can get it!
Thanks again!
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
|