Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Oct 2010
    Posts
    50
    Thanks
    31
    Thanked 1 Time in 1 Post

    How to put break in javascript mm_menu code

    Hello,

    How can I put a break in the following code so that the end result is:

    Olga L. Bradham &
    Etta L. Brooks Branch

    [CODE]mm_menu_hours_0.addMenuItem("Olga L. Bradham & Etta L. Brooks","lo cation='/lib/branches/nw.html'");
    </CODE>

    Thanks for your help,

    Elbee

    I made two lines:

    [CODE]
    mm_menu_hours_0.addMenuItem("Olga&nbsp;L.&nbsp;Bradham&nbsp;&amp;&nbsp;Etta&nbsp;L.&nbsp;Brooks","lo cation='/lib/branches/nw.html'");
    </CODE>
    [CODE]mm_menu_hours_0.addMenuItem("&nbsp;&nbsp;&nbsp;Etta&nbsp;L.&nbsp;Brooks","location='/lib/branches/nw.html'");
    </CODE>

    Was there a different way I could have done it? Thanks.
    Last edited by Elbee; 07-18-2012 at 03:04 PM. Reason: Add change of code.

  • #2
    Regular Coder
    Join Date
    Mar 2011
    Posts
    148
    Thanks
    0
    Thanked 20 Times in 20 Posts
    Hi
    If you want to add new line in JS code, use "\n":
    Code:
    mm_menu_hours_0.addMenuItem("Olga&nbsp;L.&nbsp;Bradham&nbsp;&amp;\n&nbsp;Etta&nbsp;L.&nbsp;Brooks","lo cation='/lib/branches/nw.html'");
    If you want a HTML <br>, try this:

    Code:
    mm_menu_hours_0.addMenuItem("Olga&nbsp;L.&nbsp;Bradham&nbsp;&amp;<br>&nbsp;Etta&nbsp;L.&nbsp;Brooks","lo cation='/lib/branches/nw.html'");

  • Users who have thanked MarPlo for this post:

    Elbee (07-18-2012)

  • #3
    New Coder
    Join Date
    Oct 2010
    Posts
    50
    Thanks
    31
    Thanked 1 Time in 1 Post

    Smile How to put break in javascript mm_menu code

    Thank you so much!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •