Keeping a window on top... tell me its possible

W

webdev

Hi,

I have an application built for the education market in which I open popup
windows containing ASP scripts which when the user clicks the 'Update'
button, the database is updated and the window loads a confirmation message
along with a 'Close this window' link.

All has gone well in the early stages of testing, but I've now come across a
problem where a number (a considerable number) of users seem to be incapable
of clicking in the new window. Instead, they click on the parent window,
thus hiding the child.

They lack the knowledge to look on the Windows taskbar for the hidden
window, preferring to email me telling me that '...nothing happens when I
click on the link...'

My first solution was to use <body onBlur="self.focus()"> which does keep
the window on top, but prevents any data being input to form fields in the
child window...

I've looked at the 'Goodman solution' at
http://developer.netscape.com:80/viewsource/goodman_modal/goodman_modal.html
.. but this child window disappears if you click the parent twice (yes
twice - not necessarily more than twice in rapid succession) in IE5.5
andprevents any input after clicking on the parent in Firefox.

Now, I'm content with an IE-only solution so I turned to showModalDialog()
but it seems impossible to close this window unless you click on the control
box 'X' - anyway, my requirement seems to be for a 'window on top' not a
'modal dialog'...

Question is ... Is there a way of creating a child window, which will stay
on top, accept input to form fields, load another form and allow the user to
close it from a link?

Please help - I'm not sure whether to reach for a gun - or a bottle ;0)

Regards
Rae MacLeman
 
A

Andrey

webdev said:
Hi,

I have an application built for the education market in which I open popup
windows containing ASP scripts which when the user clicks the 'Update'
button, the database is updated and the window loads a confirmation message
along with a 'Close this window' link.

All has gone well in the early stages of testing, but I've now come across a
problem where a number (a considerable number) of users seem to be incapable
of clicking in the new window. Instead, they click on the parent window,
thus hiding the child.

They lack the knowledge to look on the Windows taskbar for the hidden
window, preferring to email me telling me that '...nothing happens when I
click on the link...'

My first solution was to use <body onBlur="self.focus()"> which does keep
the window on top, but prevents any data being input to form fields in the
child window...

I've looked at the 'Goodman solution' at
http://developer.netscape.com:80/viewsource/goodman_modal/goodman_modal.html
. but this child window disappears if you click the parent twice (yes
twice - not necessarily more than twice in rapid succession) in IE5.5
andprevents any input after clicking on the parent in Firefox.

Now, I'm content with an IE-only solution so I turned to showModalDialog()
but it seems impossible to close this window unless you click on the control
box 'X' - anyway, my requirement seems to be for a 'window on top' not a
'modal dialog'...

Question is ... Is there a way of creating a child window, which will stay
on top, accept input to form fields, load another form and allow the user to
close it from a link?

Please help - I'm not sure whether to reach for a gun - or a bottle ;0)

Regards
Rae MacLeman


Use modal dialogs for popups instead:

window.showModalDialog(...) instead of
window.open(...)

Modal dialogs are pretty much as regular windows, but you can't click on parent window while dialog
is open - it should work for you.

Look here: msdn.microsoft.com/workshop/author/ dhtml/reference/methods/showmodaldialog.asp

WYGL,
Andrey
 
W

webdev

(shortened)
Use modal dialogs for popups instead:

window.showModalDialog(...) instead of
window.open(...)

Modal dialogs are pretty much as regular windows, but you can't click on parent window while dialog
is open - it should work for you.

Look here: msdn.microsoft.com/workshop/author/ dhtml/reference/methods/showmodaldialog.asp

WYGL,
Andrey

Andry,

This does work, but is there a way of closing the dialog from a link rather
than expecting an unsophisticated user to click on the control box 'X'?

Rae MacLeman
 
A

Andrey

webdev said:
(shortened)


parent window while dialog



Andry,

This does work, but is there a way of closing the dialog from a link rather
than expecting an unsophisticated user to click on the control box 'X'?

Rae MacLeman

Rae,
Maybe i misunderstood you but what is the problem with closing a window?
In your dialog page you place a button:
<input type='button' value='Close Me!' onClick='window.close()'>
It does the trick!

Is that what you need?
If you need something else, please explain and i'll try to help you

WYGL,
Andrey
 
W

webdev

Andrey said:
Rae,
Maybe i misunderstood you but what is the problem with closing a window?
In your dialog page you place a button:
<input type='button' value='Close Me!' onClick='window.close()'>
It does the trick!

Is that what you need?
If you need something else, please explain and i'll try to help you

WYGL,
Andrey

Andry,

My question arose because I'd been using ...

<a href='javascript:window.close();'>Close Me</a>

which doesn't work - yours does! Thank you

Rae
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top