Textbox text changed and js confirmbox

Reply

Join Date: Feb 2009
Posts: 1
Reputation: babashankar is an unknown quantity at this point 
Solved Threads: 0
babashankar babashankar is offline Offline
Newbie Poster

Textbox text changed and js confirmbox

 
0
  #1
Nov 3rd, 2009
I have multiple textboxs which are created dynamically in page_load.
TextBox tb = new TextBox();
tb.id = "ID1";
tb.text = GetfromDB();
tb.TextChanged +=new EventHandler(tb_TextChanged);

Now i want to add a javascript confirmbox as
tb.Attributes.Add("onchange","javascript:return confirm('Data has Changed. Click OK To Continue');");

If the user clicks ok then continue to tb_TextChanged function and if user clicks cancel i want to restore the previous value of textbox.
How can i write the javascript function?

Thanks
Reply With Quote Quick reply to this message  
Join Date: Sep 2008
Posts: 6
Reputation: mailme.vibin is an unknown quantity at this point 
Solved Threads: 1
mailme.vibin mailme.vibin is offline Offline
Newbie Poster
 
0
  #2
Nov 3rd, 2009
u have to find the function to get the return value of that OK button..i will check and post soon
Reply With Quote Quick reply to this message  
Reply

Message:




Views: 283 | Replies: 1
Thread Tools Search this Thread



Tag cloud for ASP.NET
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC