By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,702 Members | 1,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,702 IT Pros & Developers. It's quick & easy.

Constant focus on popup

P: n/a
pd
guys,

i am trying to put the focus on my popup. When the user clicks on a
button i display a popup and want to keep it in focus ie, the user cant
minimise or do anything unless they close the pop up first.

now i have implemented this using onblur=window.focus() on my popup.
and this works fine, the user cant do anything till they close the pop.
but i also have some form controls within my pop-up, which have now
become useless. i cant type in them or select anything.

so my question is how can i keep my pop up at the top and at the same
time use the pop up to enter text.

thanks.

Nov 21 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
pd escreveu:
i am trying to put the focus on my popup. When the user clicks on a
button i display a popup and want to keep it in focus ie, the user cant
minimise or do anything unless they close the pop up first.
It's wrong to do such things, force the user to do what you want, and he
can disable the JavaScript engine easily, so, as it's not reliable, I
don't see the point.
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Nov 21 '06 #2

P: n/a
pd
every application has a different purpose and so does mine.

if i could get this implementation to work, that would be great. and
any help would be appreciated.

Nov 21 '06 #3

P: n/a
pd escreveu:
every application has a different purpose and so does mine.

if i could get this implementation to work, that would be great. and
any help would be appreciated.
Ok, but don't remove all the original text from the message or people
won't understand what you're talking about, remember this isn't an
email, where the person has a copy of the original message or knows what
you're talking about.

If you want to give focus to the window all the time, leave a
setInterval calling the focus method, it's dirty... On IE you can call a
function named "openModalDialog" or something like this and on Firefox
there's a solution too, but using such dependent things are worse in my
opinion :)

But it's true, every application has a purpose, but you must adapt
yourself to the environment, not the contrary, the web has a main idea
and a lot of limits which you can break.

I even remembered of my boss, he was desiring to put his content on the
web, but didn't wanted people copying his material, I told him that I
just could make idiot things to prevent normal users, but that avoiding
the copy is impossible :)
--
Jonas Raoni Soares Silva
http://www.jsfromhell.com
Nov 21 '06 #4

P: n/a
any other ideas guys. surely somebody must have had the same problem in
the past.

Nov 22 '06 #5

P: n/a
Jonas Raoni wrote:
If you want to give focus to the window all the time, leave a
setInterval calling the focus method, it's dirty... On IE you can call a
function named "openModalDialog" or something like this and on Firefox
there's a solution too, but using such dependent things are worse in my
opinion :)
Yes, it's explained here:

http://msdn.microsoft.com/workshop/a...odaldialog.asp

Use with care, I'ld say... and one should definitely provide in an
alternative where showModalDialog is not supported.

--
Bart

Nov 22 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.