Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Datagrid Control > How to call java script function on datagrid update command event

Reply
Thread Tools

How to call java script function on datagrid update command event

 
 
Santoshmshinde_it@yahoo.com
Guest
Posts: n/a
 
      05-13-2006
please tell me what is the problem in this code if i am click OK or
Cancel same function get executed.

<script language="javascript">
function ConfirmAddRecords()
{
var agree;
window.confirm("Are U sure to save Records");
if (agree==true)
{
true ;
}
else
{
false ;
}
}
</script>

regards
Santosh Shinde

 
Reply With Quote
 
 
 
 
Brock Allen
Guest
Posts: n/a
 
      05-13-2006
You are not capturing the return value from confirm. Here's something simpler:

function ConfirmRecords()
{
return window.confirm("You sure?");
}

-Brock
http://staff.develop.com/ballen


> please tell me what is the problem in this code if i am click OK or
> Cancel same function get executed.
>
> <script language="javascript">
> function ConfirmAddRecords()
> {
> var agree;
> window.confirm("Are U sure to save Records");
> if (agree==true)
> {
> true ;
> }
> else
> {
> false ;
> }
> }
> </script>
> regards
> Santosh Shind



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
DataGrid - Update Command Event Problem Mr Newbie ASP .Net 1 09-21-2005 06:38 AM
How to call javascript when click update command(it Edit command c prakash ASP .Net Web Controls 2 04-11-2005 04:07 AM
write a function such that when ever i call this function in some other function .it should give me tha data type and value of calling function parameter komal C++ 6 01-25-2005 11:13 AM
Call Datagrid Command column outside datagrid Dave ASP .Net 0 11-20-2003 11:11 AM



Advertisments