473,569 Members | 2,782 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

New line in a prompt?

Computer Guru
16 New Member
Prompts and alerts are usually one lined. However, my prompt statement is rather long and does not fit on one line. With js alerts I use something like this...

<a href="javascrip t:alert('a'+'\n '+2+'\n'+'b');" >test</a>


but this doesn't seem to work with my prompt.


[HTML]<script>
function ask()
{
pass=prompt("Th is feature will be available to non-members until July 5th 2008. Enjoy the free surfing! abc123","");
if(pass=="abc12 3" && pass!=null)
{
alert("Correct password. Access granted")
}
else { alert("Incorrec t password. Access denied") window.location .href="http://shamtech.webs.c om/loginfailure.ht m"; }
}
window.onload=a sk
//stop-->
</script>[/HTML]


Please help!
Jun 26 '08 #1
2 3331
eWish
971 Recognized Expert Contributor
Moving to the JavaScript Forum.

--Kevin
Jun 26 '08 #2
acoder
16,027 Recognized Expert Moderator MVP
On line 9, you have two statements without a semi-colon in between. It's always a good habit to end your statements with semi-colons anyway.
Jun 27 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

6
14586
by: Paul Deverson | last post by:
I'm a newbie to MySQL and am really confused about when I should be using the Command Line Client and when the DOS prompt. I'm using Windows XP and I've just installed MySQL 4.1.10. I can use the Command Line Client to logon as 'root'. It prompts me for a password and then I can create databases, etc. from the mysql prompt. However, if I...
1
1603
by: tim | last post by:
Hello All I am writing an asp app for generating quotes. What I would like to do is allow the user to edit the quote lines without having to open a new page each line. On the quote I have created a loop which goes through the recordset and populates a sort of data grid. Can you use javascript or something so the user can click an edit...
10
9276
by: Steve | last post by:
Is there anyone with experience using the Winzip command line add-in? I can't get it to create the zip file with a space in the file name. Using: RetValue = Shell("C:\winzip\wzzip.exe C:\MyFolder\My ZipFile.Zip C:\MyOtherFolder\MyFile.mdb") What is the syntax when you want a space in the zipfile file name?
34
6827
by: Roman Mashak | last post by:
Hello, All! I'm implementing simple CLI (flat model, no tree-style menu etc.). Command line looks like this: <command> <param1> <param2> ... <paramN> (where N=1..4) And idea is pretty simple: 1) get whole string of input line 2) preset table of strings matching <command> 3) preset table of function calls
9
5195
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still facing problems: Assume that FILE* filePointer; unsigned char lineBuffer;
8
22352
by: Meatwad15 | last post by:
Since some people don't know how to line break, here's your answer. msgbox "Prompt" & vbCrlF & "Another line's prompt", vBInformation, "Title" If you want more than one line break: msgbox "Prompt" & vbCrlF & vbCrlF & "Two lines down from prompt", vBInformation, "Title" Because I googled to see if any other sites knew, and this site had...
9
2480
by: Endless Story | last post by:
My last version of Python was 2.4, running smoothly on XP with path c: \Python24 - no need even to include this path in PATH; everything worked as it's supposed to at the command line. Just installed Python 2.5, after uninstalling 2.4 (and also 2.3 which had lingered). Now if I open a shell in Windows Python is not available! Here are the...
3
2093
trkrbabe
by: trkrbabe | last post by:
Hi, this is my first time posting here. It appears that I am taking the same class as a few other people here. I have only been learning Java for about five weeks now. I have my Product class compiled and I finally got my Inventory class compiled but when I run the program it prints the first line correctly then I input the item name but then...
5
1838
by: waltbrad | last post by:
Hi folks. I'm learning Python from the Mark Lutz Book, Programming Python 3rd edition. He seems to be able to invoke the Python interpreter from any command line prompt. C:\temp>python C:\PP3rdEd\examples>python
7
9343
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should display the Windows form. The form is being displayed but the command only returns when the form is closed. I want the command line to return...
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7672
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7968
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6283
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5512
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1212
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
937
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.