0

Hai,everybody

i need help

how can i make it user click join button->change the text "view"

after that user click view btn goes another page

any body plz help me.

this code change text working fine.

function showtext()
  {
  document.getElementById("joinbutton").childNodes[0].nodeValue="View in MyPlans"


 }

 <a href="#" id="joinbutton" class="planpeople" onclick="javascript:showtext()">Join</a>
3
Contributors
2
Replies
5
Views
5 Years
Discussion Span
Last Post by Taywin
0

If you want to use thesame button for two or more tasks you need to check what the correct text of the button is and then call the needed code based on the button text. E.g. if your button text == "view" then call the redirect code.Is that what you are after?

0

Why are you using an anchor tag and call it button? Anyway, if you want to only change the display text, you could simply do it as...

<a href="#" class="planpeople" onclick="javascript:this.innerHTML='View in MyPlans'">Join</a>

If you want it to do more than just changing its display text, you may need a function to handle that for cleaner script purpose.

Edited by Taywin

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.