views:

538

answers:

2

While clicking outside modal window(iframe), it gets closed that's not suitable for forms etc.. how to disable this thing?? :S

+1  A: 

Please take a look at the website: http://colorpowered.com/colorbox/

There's a table with al sorts of key/value options you can add to your colorbox method. One of the keys is: overlayClose
By default this is set to true and the description states:

If true, enables closing ColorBox by clicking on the background overlay.

Just add the key/value pair to the method call and you will have a modal window.

$.fn.colorbox({ overlayClose: false });

This as an alternative to your answer/comment.

Zaagmans
my bad, i missed that key..
ehmad11
no worries! I'm just trying to help ;-)
Zaagmans
thanks ..............
ehmad11
A: 

escKey: false in the colorbox constructor should do it.

Sean