How to call java script function on datagrid update command event

Discussion in 'ASP .Net Datagrid Control' started by Santoshmshinde_it@yahoo.com, May 13, 2006.

  1. Guest

    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
     
    , May 13, 2006
    #1
    1. Advertising

  2. Brock Allen Guest

    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
     
    Brock Allen, May 13, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave
    Replies:
    0
    Views:
    448
  2. Mr Newbie

    DataGrid - Update Command Event Problem

    Mr Newbie, Sep 21, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    531
    Mr Newbie
    Sep 21, 2005
  3. grbgooglefan
    Replies:
    2
    Views:
    432
    Pascal Bourguignon
    Jan 30, 2008
  4. Andreas Klemt
    Replies:
    0
    Views:
    308
    Andreas Klemt
    Oct 8, 2003
  5. prakash
    Replies:
    2
    Views:
    595
    prakash
    Apr 11, 2005
Loading...

Share This Page