in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Menu item click client confirm

Last post 03-03-2008 3:31 AM by cristido. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 02-27-2008 5:52 AM

    Menu item click client confirm

    I have a C1WebMenu and I want to ask a client confirm when the user click an item. I've tried to add a ClientScript but it does not work :

    <c1c:C1WebMenuItem Text="Item1" ClientScripts="onclick:return confirm('Do you confirm ?');"></c1c:C1WebMenuItem>

    Any idea ?

    Thanks

  • 02-29-2008 4:43 PM In reply to

    Re: Menu item click client confirm

    I tried the same code for the onclick event of the item as return confirm('r u sure') and it worked.
     
    Please try the following build of this control and then let me know your observation.
     
     
    Regards,
    Patrick
    <cristido> wrote in message news:202304@10.0.1.98...

    I have a C1WebMenu and I want to ask a client confirm when the user click an item. I've tried to add a ClientScript but it does not work :

    <c1c:C1WebMenuItem Text="Item1" ClientScripts="onclick:return confirm('Do you confirm ?');"></c1c:C1WebMenuItem>

    Any idea ?

    Thanks



    http://helpcentral.componentone.com/cs/forums/p/74446/202304.aspx#202304

  • 03-03-2008 3:31 AM In reply to

    Re: Menu item click client confirm

    Thank you Patrick, but I'm already using the C1WebCommand ver 2.0.20073.170.

    The alert command question appears but if I answer NO the C1WebMenu fires the postback, this is the problem. If the onclick event return false the postback must NOT be fired, in a standard button the onclick event work in this way.

    I have a context C1WebMenu with a Delete menu item and I must ask client confirm to the command, if the user click NO the postback event must be cancelled (I think), or there is another way to do this ?

     

Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.