Thread: Popup window.

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    4
    Rep Power
    0

    Popup window.


    All,
    Really stupid question, but I am new at using Javascript.

    I have an alert window set, however I need to format the text to be displayed.
    How do I start a new line, so that text will read like the following: -

    Error entering your password.
    Please re-enter.

    Not bothered about alignment, just need to have seperate lines,
    at minute, script reads -


    window.alert('Error entering your password. Please re-enter');
    All help appreciated.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2002
    Posts
    2
    Rep Power
    0
    JavaScript uses the backslash to signify control characters. You need a new line, for which the control character is '\n', so try:
    window.alert('Error entering your password.\nPlease re-enter.');
    and Bob is, as they say, very much your uncle.

IMN logo majestic logo threadwatch logo seochat tools logo