Jump to content

[SOLVED] unterminated string literal


The Little Guy

Recommended Posts

I am trying to do a multiline string, like the following:

		opt = "<h2 class=\"red\">Password</h2>\
	<p>\
		Your password is your secret code that allows you to log into your account,\
		this will be accompanied by your email address.\
	</p>\
	<p>\
		The password MUST be:<br />\ 
		no less than 6 characters<br />\
		no more than 10 characters.<br />\
		must have at least 1 number and one alpha character\
	</p>";

 

The problem I am getting is with this section:

			The password MUST be:<br />\ 
		no less than 6 characters<br />\
		no more than 10 characters.<br />\
		must have at least 1 number and one alpha character\
	</p>";

 

I am getting the following error, but I don't know what it means:

Error: unterminated string literal

Source File: http://www.dudeel.com/incl/js/index.js

Line: 33, Column: 8

Source Code:

  The password MUST be:<br />\ 

 

FF's Error Console, has an arrow pointing between the "a" and the "s" in "password".

What do I need to do to fix this??

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.