Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I change the text on an HREF when clicked...? 1

Status
Not open for further replies.

WildWest

Programmer
Apr 2, 2002
111
0
0
US

How do I change the text on an HREF when clicked...? I need to do something like the following button, for an HREF.

HREF (doesn't work):
<a href="mypage.htm" Onclick="this.value='Loading...Please wait!'">Go There</a>

Button (works fone):
<input name="Save" type="submit" value="Save All" Onclick="this.value='Saving...Please wait!'">

Thanks in advance!
 
use innerHTML to change the value:
Code:
<script language=JavaScript>

</script>
<body>
<form name=blahForm>
<a href='javascript:void(0)' onclick='this.innerHTML = "Loading, please wait"'>Click Me</a>
</form>
</body>

-kaht

banghead.gif
 
WOW - Works great! THX! Many stars for you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top