views:

352

answers:

1

I have asp.net button on my page. When I click the button using javascript (buttonId.click()), firefox seems to fire all onclick eventhandlers on the page. I would like to click only one button.

This scenario is working fine in Internet Explorer.

Please let me know of any workarounds for this.

Thanks

A: 

Simple workaround is:

  1. make a div, height 100% of the page, width 100% of the page
  2. this div is hidden
  3. make a function showDiv() that show your div
  4. on every action in your page you'll use a javascript function
  5. last row of all javascript function is showDiv();

then after every click that call a javascript function other click on this page are disabled.

ps. obviously the div need remains allign to viewport (top=0;left=0)

tommaso
I wouldn't call that "simple" and I doubt it will solve the OP's problem.
AUSteve