button clicked

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nithya  Venkatachalam

    button clicked

    Hi,

    onclicking a button, iam calling a function which loads some other
    page. so, it is calling onUnloadhandler .
    In this onunloadhandler , is there any way to find the name of that
    button?

  • Randy Webb

    #2
    Re: button clicked

    Nithya Venkatachalam wrote:[color=blue]
    > Hi,
    >
    > onclicking a button, iam calling a function which loads some other
    > page. so, it is calling onUnloadhandler .
    > In this onunloadhandler , is there any way to find the name of that
    > button?
    >[/color]

    Why not just send the buttons id or name when you call the function?

    <button onclick="someFu nction(this.id) " id="myButton">T ext</button>

    But I think the event handler you want is onBeforeUnload, not onunload.

    --
    Randy
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    Working...