views:

26

answers:

1

Hi All,

I am going through a weird problem while using lightbox .

Where ever the new light box is used user is able to open the same light box on same page number of time. For e.g

Using tab button go to `Lightbox link`.
Press enter --> Light box will open.
Press enter --> second light box open below the previous one.
and so on.......

The problem is occurred when I use tab and entered on the link my focus is not getting changed from the link and so user is able to open multiple lightbox on clicking enter.

I try following but it not works for me

<a href = '/calenders/add_shipment' onclick ="this.blur()" class='lbOn'>
   <img src='/images/box-plus.png' style='border:none;'>
</a>

what should be my approached to get out of this.

A: 

i done it using the set focus in the hidden textfield. As follows

<script type="text/javascript" language="JavaScript">
  document.getElementById('set_focus').focus();
</script>

<div style="display:none;"><input type="text" size="20"  id="set_focus"/></div>
Salil