...

View Full Version : Keeping a popup window visible



Gary Williams
04-13-2003, 09:24 AM
Hi All,

I have a Form based questionaire. Some of the questions, if answered 'yes', cause a popup window to appear displaying additional questions.

This popup can be closed by:

1. Clicking on the 'Close Window' button I have coded in.
2. Clicking on the 'X' button in the top right hand corner of the popup window.

The popup will drop to the task bar if the mouse is clicked outside the popup window.

I need to force the popup to remain on top and ignore:

1. Clicking on the 'X' button in the top right hand corner of the popup window.

2. Dropping to the task bar if the mouse is clicked outside the popup window.

It must only close by clicking on the 'Close Window' button.

Anyone got any idea's?

Regards

Gary

HairyTeeth
04-13-2003, 12:48 PM
To maintain the popups focus do this: (often used in the body tag)

onblur=self.focus()

Re: disabling the close button (X), i have no idea. Personally, i wouldn't take that option away from the user even if i could. Users need those sorts of options.

brothercake
04-13-2003, 02:08 PM
I'd say don't do it with a window at all - do with a DHTML layer, then you can control its modality.

Gary Williams
04-13-2003, 07:28 PM
Hi Hairyteeth and Brothercake,

Thanks for the code. I didn't realise it would be so simple.

I wasn't sure if it were possible to disable the 'X' button, just wondered.

I agree with the advice re layers, but I'm so close to the end of this project that I will stick with the popups, but next time, it's layers!

Thanks guys

Gary

Gary Williams
04-13-2003, 11:30 PM
Hi Guys,

The onblur=self.focus() code keeps the popup visible but won't let me change any of the combo box values. The only thing that works is the submit button.

Regards

Gary



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum