Skip to Content
author's profile photo
Former Member

cancelsubmit within tableviews

Hi all,

I want to delete an entry within a tableview by using a confirmation popup. So everytime I set htmlbevent.cancelSubmit = true the server event is fired anyway. How could I avoid this ? Here is the particular code fragment:

...

<htmlb:tableViewColumns>

<htmlb:tableViewColumn columnName = "delicon"

title = "delete"

type = "user"

onCellClick = "delete"

fixedColumn = "true"

horizontalAlignment = "center">

<htmlb:image src = "ICON_DELETE"

onClientClick = "htmlbevent.cancelSubmit = !confirm('really want to do this?');" />

</htmlb:tableViewColumn>

...

Is there anybody who can give me an idea what went wrong with this ?

Regards,

Marco

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Jul 13, 2004 at 12:28 PM

    Hallo Marco,

    One of two ideas:

    (1) Remove the onCellClick. This is the guy that is sending the request to the server. And add the click onto the image.

    (2) Add this following string onto the onClientClick "event.cancelBubble=true;" to prevent the event from been handled by someone else. Probably you only want to do it if htmlbevent.cancelSubmit is true.

    Recommended would be (1).

    ++bcm

    Add comment
    10|10000 characters needed characters exceeded

    • > But tell me, where I can find stuff like

      > "event.cancelBubble" ? Things like that never ever

      > appears in any documentation I read.

      Pure JavaScript. I have three books on JavaScript alone in my office. But in this case, I asked S., the real HTML and JavaScript expert in our group! I only do the ABAP parts :).

      Unfortunately there is no other way. Like I wrote before, you have here in mix of ABAP, BSP, HTML and JavaScript!