473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Constant focus on popup

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
5 1663
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
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
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
any other ideas guys. surely somebody must have had the same problem in
the past.

Nov 22 '06 #5
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: N/A | last post by:
Hey all, If I open a popup like this window.open('http://www.google.com', 'popup', 'width = 618, height = 425, directories = no, location = no, menubar = no, resizable = no, scrollbars = yes,...
9
by: Randell D. | last post by:
Folks, I'm working on a contact name/address database whereby a slimed down list is shown in the main window. When a record is selected, the complete record is displayed in a new window via a...
31
by: Benno Bös | last post by:
If I use the following construct in the frame "main" for a link to an extern site: <A HREF="http://www.any.xy" TARGET="extern"> the Browser is creating the window "extern", loading the page...
2
by: Moist | last post by:
Hi, first I must admit this is one of the most active group I have ever seen. For my question: is it possible to create a small popup window that remain in focus until it is closed. That is,...
1
by: Jens Körte | last post by:
Hi NG! I encountered some strange behaviour when using focus() I use a form with several input-fields. A user can enter stuff. After entering I want to check the value, i.e. that a number is...
3
by: Dave | last post by:
We are developing a web page that shows large graphics. To provide more screen space for the graphics, we allow the user to popup a window that places itself over the top part of the browser. This...
13
by: theintrepidfox | last post by:
Dear Group I wondered whether you can help me with this. I do have a page that contains a button and an IFrame. The IFrame contains a dummy page that is set to redirect to a word document when...
0
by: theintrepidfox | last post by:
Dear Group Some would think this works but somehow the Focus Button Click Event comes back with a message saying that WindowObjectReference is either NULL or not an object! Both buttons are...
11
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.