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

Prompt() in Safari

P: n/a
Greetings,

I was wondering if there was a way to make prompt() calls in Safari
show a single-line input box instead of the default multi-line prompt
that it currently does.

It seems like most other browsers just provide a single-line prompt
text box, meaning that the user hitting ENTER is the same as them
hitting the "Ok" button. In Safari (where the prompt() calls result in
a multi-line input box), hitting ENTER is interpreted as a new line
return.

This is just a matter of consistency. Some of my less computer savvy
users have been irritated by this and my Googling hasn't turned up a
way to make the prompts single line.
Jan 3 '08 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Jan 3, 2:23*pm, Greg Taylor <squishywaf...@gmail.comwrote:
Greetings,

I was wondering if there was a way to make prompt() calls in Safari
show a single-line input box instead of the default multi-line prompt
that it currently does.
No. You are stuck with whatever the browser provides.
>
It seems like most other browsers just provide a single-line prompt
text box, meaning that the user hitting ENTER is the same as them
hitting the "Ok" button. In Safari (where the prompt() calls result in
a multi-line input box), hitting ENTER is interpreted as a new line
return.
That is irritating. Best not to use prompt at all though. Same for
alert. Some aggressive popup blockers intercept them.
Jan 4 '08 #2

P: n/a
On Jan 4, 5:23*am, Greg Taylor <squishywaf...@gmail.comwrote:
Greetings,

I was wondering if there was a way to make prompt() calls in Safari
show a single-line input box instead of the default multi-line prompt
that it currently does.
No, but you can do an imitation of a prompt using script and DOM
elements.

It seems like most other browsers just provide a single-line prompt
text box, meaning that the user hitting ENTER is the same as them
hitting the "Ok" button. In Safari (where the prompt() calls result in
a multi-line input box), hitting ENTER is interpreted as a new line
return.
Not in Safari 3.0.4, it behaves as other browsers do, which is
annoying as it displays a multi-line field but when you press the
return or enter keys to enter another line, it submits.

This is just a matter of consistency. Some of my less computer savvy
users have been irritated by this and my Googling hasn't turned up a
way to make the prompts single line.
Tell them to change browsers or update to Safari 3.
--
Rob
Jan 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.