Click here to Skip to main content
15,890,282 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi sir i am using one button ,for first click i am changing the text=change emailid
and for second click text=update emailid,how i have to write the java script for second click..
Posted
Comments
AshishChaudha 11-Jul-12 6:42am    
Please clear your question..do you want to change the Text of button through javascript???

As i got your question.......


Quote:
<script type="text/javascript">
function ClearData() {
document.getElementById("lblMsg").innerHTML = '';
}
</script>


Pass this
Quote:
ClearData()
on your button's properties "OnClientClick" and i think u will get the answer....

If not clarify the question please.....
 
Share this answer
 
please write your problem completelly.
 
Share this answer
 
Comments
pradiprenushe 11-Jul-12 8:31am    
This cant be in answer section........
I don't think this is a good design but still I will try to give you a solution.

JavaScript
var clickCount = 0; //this should be a global variable

function func()
{
   if(clickCOunt == 0)
   {
      //set the text to enter email
      clickCount++;
   }
   else
   {
      //set the text to UPDATE email
   }
}


I hope my understanding on the question is correct. if not do let me know and I will try to refine the answer.
 
Share this answer
 
Comments
Prasad_Kulkarni 11-Jul-12 6:45am    
Right, 5!
Rahul Rajat Singh 11-Jul-12 6:46am    
thanks.
Manas Bhardwaj 11-Jul-12 7:07am    
Correct +5!
[no name] 11-Jul-12 7:39am    
my 5+
Chandrashekar SK 11-Jul-12 8:42am    
Perfect :) +5

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900