how to call code behind function in javascript ? [modified]
-
Hi All, I have a button on page. when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further. Please tell me how can I do this using javascript ? I need to show confirmation message. Thanks. Regards, Sunil
modified on Monday, September 8, 2008 4:27 AM
-
Hi All, I have a button on page. when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further. Please tell me how can I do this using javascript ? I need to show confirmation message. Thanks. Regards, Sunil
modified on Monday, September 8, 2008 4:27 AM
hi, give this code in the button click event onclientclick = "return confirm('Record already ....continue?);" it will popup a window asking confirmation if u click yes then 1ly it will invoke server side validation if u click no it will b in the same page and no event will get fired.
T.Balaji
-
Hi All, I have a button on page. when user click this button it will call a server side function, which check some data in database. then there will be confirmation message like "Record already exist, Do you want to continue?". if user click (OK)Yes then it will process further in database using another server side function. otherwise it will not process further. Please tell me how can I do this using javascript ? I need to show confirmation message. Thanks. Regards, Sunil
modified on Monday, September 8, 2008 4:27 AM
You can use ajax to call server side function by javascript.