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

IE support for prompt( )?

P: n/a
IE seems to provide crippled support for the prompt( ) method.

While Firefox will display a couple of sentences separated with 'white
space' using \n\n IE6 will not display the white space or the second
sentence.

Is this in fact an IE crippleware implementation or is there some other
method to display a couple of instructional sentences separated by white
space using a couple of newline characters?

<%= Clinton Gallagher
Dec 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
clintonG wrote:
IE seems to provide crippled support for the prompt( ) method.

While Firefox will display a couple of sentences separated with 'white
space' using \n\n IE6 will not display the white space or the second
sentence.

Is this in fact an IE crippleware implementation or is there some
other method to display a couple of instructional sentences separated
by white space using a couple of newline characters?


No problem with my IE6, the following:

prompt("blda doe hshshh shhshs \nhshhhhh hshhhh
shhh\n\nfsfsfffsffffsffffsff*")

Displays as expected in the dialogue:

blda doe hshshh shhshs
hshhhhh hshhhh shhh

fsfsfffsffffsffffsff*
JW
Dec 13 '05 #2

P: n/a
<snip />

Thanks for confirming the support for new line and white space.

Will you check this out and see if you get the desired two line results
separated by 'white space' then?

I have an [RSS METROmilwaukee] feed button on my website. Perhaps you do to.
I am using an image map for the 'button' and I am using the prompt method in
a way that is best described by raising its event at
http://clintongallagher.metromilwaukee.com/ to observe how it is being used
in practice.

I have isolated a prompt using onload in the body element and it still does
not produce the desired reaults with IE6 but does with FF.

<%= Clinton Gallagher



Dec 14 '05 #3

P: n/a
clintonG wrote:
I have isolated a prompt using onload in the body element and it still does
not produce the desired reaults with IE6 but does with FF.


When using with IE6 on XP, it works fine. With IE6 on Win2K there's
indeed a problem.

A possible workaround would be to apply a mix of JS & vbscript:

<!-- First declare the VBS function -->
<script type="text/vbscript">
function doit()
InputBox "Bla bla bla" & vbLf & vbLf & " Bla", "","Default String"
doit = false
end function
</script>

<!-- Then declare the JS equivalent -->
<script type="text/javascript">
function doit() {
prompt("Bla bla bla\n\n Bla", "Default String");
return false;
}
</script>
....

<area ... onclick='return doit()' />

This way, FF will use the JS function, while IE picks out the VBS
function and ignores the JS function.

Not pretty, but it seems to work...
JW

Dec 14 '05 #4

P: n/a


"Janwillem Borleffs" <jw@jwscripts.com> wrote in message
news:43***********************@dr2.euro.net...
clintonG wrote:
I have isolated a prompt using onload in the body element and it still
does not produce the desired reaults with IE6 but does with FF.


When using with IE6 on XP, it works fine. With IE6 on Win2K there's indeed
a problem.

A possible workaround would be to apply a mix of JS & vbscript:

<!-- First declare the VBS function -->
<script type="text/vbscript">
function doit()
InputBox "Bla bla bla" & vbLf & vbLf & " Bla", "","Default String"
doit = false
end function
</script>

<!-- Then declare the JS equivalent -->
<script type="text/javascript">
function doit() {
prompt("Bla bla bla\n\n Bla", "Default String");
return false;
}
</script>
...

<area ... onclick='return doit()' />

This way, FF will use the JS function, while IE picks out the VBS function
and ignores the JS function.

Not pretty, but it seems to work...


Thank you for confirming. This is wierd heh? Thanks for suggesting using
VBS.

<%= Clinton Gallagher
Dec 14 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.