IE Prompt

Discussion in 'Javascript' started by robert.don.wilson@gmail.com, Feb 22, 2007.

Guest

General Problem:
Since IE7 decided to mess with the prompt function we've had an
interesting problem to solve. We just want to ask the user for a name
but we would like it to have a modal implementation (not let the user
go anywhere until they click ok or cancel).

Problem with the IEPrompt script:
The problem with this script is that it doesn't work correctly in IE6
mostly. We want the prompt to display in the middle of the screen no
matter how much of the screen they've scrolled down or whatever. In
IE6, the prompt only displays in what would be the middle of the
screen if you were scrolled to the top of the page and it doesn't gray
out any more than what would be a whole page if you were scrolled to
the top.

Main question:
Anyways, I've tried tweaking it a little bit and I can't get anything
to work. We need it to work in Firefox, IE6, and IE7. I don't care
if I fix this script or not, I just want something to work nicely.
Does anyone know of anything that we could use to solve this problem?

Advertisements

<> wrote in message
news:...
> General Problem:
> Since IE7 decided to mess with the prompt function we've had an
> interesting problem to solve. We just want to ask the user for a name
> but we would like it to have a modal implementation (not let the user
> go anywhere until they click ok or cancel).
>
> A script that I found (IEPrompt):
> I found a script that basically does what we want. It grays out the
> whole screen, places a div in the middle of the screen and waits for
> user input. It is IEPrompt. You can see this script here:
> http://www.hunlock.com/blogs/Working_around_IE7s_prompt_bug,_er_feature.
>
> Problem with the IEPrompt script:
> The problem with this script is that it doesn't work correctly in IE6
> mostly. We want the prompt to display in the middle of the screen no
> matter how much of the screen they've scrolled down or whatever. In
> IE6, the prompt only displays in what would be the middle of the
> screen if you were scrolled to the top of the page and it doesn't gray
> out any more than what would be a whole page if you were scrolled to
> the top.

The modified version works just fine in Internet Explorer 6 and "pops" up in the middle of
the current viewport.
> Main question:
> Anyways, I've tried tweaking it a little bit and I can't get anything
> to work. We need it to work in Firefox, IE6, and IE7. I don't care
> if I fix this script or not, I just want something to work nicely.
> Does anyone know of anything that we could use to solve this problem?

Try asking the author. He is very helpful and knowledgeable - especially about his own
creations.

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!