Constant focus on popup

P

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

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

Jonas Raoni

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

Jonas Raoni

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 :)
 
B

Bart Van der Donck

Jonas said:
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/author/dhtml/reference/methods/showmodaldialog.asp

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

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,774
Messages
2,569,596
Members
45,129
Latest member
FastBurnketo
Top