|
-
Apr 19th, 2001, 06:31 AM
#1
Thread Starter
Black Cat
It's window.prompt("message", "default"), where message is the text on the box, default is the default text in the user input area. It returns the string the user typed, an empty string if they didn't type anything, and null if they clicked cancel.
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Apr 19th, 2001, 07:02 AM
#2
Hyperactive Member
Hi Josh,
Thanks for this!! How can I now store whatever the user entered in a variable so that I can use it again later eg. after the user enters whatever into the textbox I want to now do something like alert(var1) - where var1 is what the user entered.
Also, how can I change the input box NOT to have the OK,CANCEL and the text "Explorer user prompt" and "Javascript Prompt" on it. Can I also determine the size of the box as well as where it's positioned on the screen.
Thanks,
T
-
Apr 19th, 2001, 10:24 AM
#3
Thread Starter
Black Cat
Code:
var1 = prompt("blah blah", "NO!");
alert(var1);
I don't think you can change much to the prompt. Some of the text is put there for security reasons (actually, so you can't trick ignorant users).
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|