Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Keeping a window on top... tell me its possible

Reply
Thread Tools

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

 
 
webdev
Guest
Posts: n/a
 
      10-06-2004
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/vie...man_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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04


 
Reply With Quote
 
 
 
 
Andrey
Guest
Posts: n/a
 
      10-06-2004
webdev wrote:

> 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/vie...man_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
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04
>
>



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
 
Reply With Quote
 
 
 
 
webdev
Guest
Posts: n/a
 
      10-06-2004

"Andrey" <(E-Mail Removed)> wrote in message
news:4oW8d.198681$D%.170422@attbi_s51...
(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



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04


 
Reply With Quote
 
Andrey
Guest
Posts: n/a
 
      10-06-2004
webdev wrote:

> "Andrey" <(E-Mail Removed)> wrote in message
> news:4oW8d.198681$D%.170422@attbi_s51...
> (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


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
 
Reply With Quote
 
webdev
Guest
Posts: n/a
 
      10-07-2004

"Andrey" <(E-Mail Removed)> wrote in message
news:38X8d.191699$MQ5.163499@attbi_s52...
> webdev wrote:
>
> > "Andrey" <(E-Mail Removed)> wrote in message
> > news:4oW8d.198681$D%.170422@attbi_s51...
> > (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

>
> 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


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 14 04-03-2010 10:08 AM
Its a bird, its a plane, its.. um, an Attribute based System? thunk Ruby 0 04-01-2010 10:25 PM
Its a bird, its a plane, no ummm, its a Ruide thunk Ruby 1 03-30-2010 11:10 AM
Use BeautifulSoup to delete certain tag while keeping its content Jackie Wang Python 3 09-08-2008 02:52 AM
DataList not keeping some of its attributes. tshad ASP .Net 1 03-09-2005 11:55 PM



Advertisments