(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    The drop down menu buttons have a problem with newlines.

Return to Recent Questions


Q: The menu has a problem with newlines. The menu builds correctly (layout ok) but when pressed on the button nothing happens

At some point, in the DHTML menu, we have the following in the javascript:

var menuitems = [

["|Print HTML","javascript:alert('HTML print: Only the 7 most recent orders on the screen \n will be printed because of space limitations on paper.');printResult('4'); ","","", ,"_parent",,] ]

As you can see we have a newline (\n) between the words "screen" and "will". But when we click on the button nothing happens. If we remove the newline and we click on the button then we first get the alert box. After pressing the OK button the function printResult is called.

Is there any way for us to still use the newline character in the menuItems variable?

This can be easily reproducible. That's why I haven't made an example.


A: Try to write in the following way \\n:

["|Print HTML","javascript:alert('HTML print: Only the 7 most recent orders on the screen \\n will be printed because of space limitations on paper.');printResult('4'); ","","", ,"_parent",,]





Return to Recent Questions

Related:
Best AI Website Builder - Create Website Design with AI Website Builder for Churches, Authors, Consultants, Magazines  |  Best Website Builder for Education, Software Companies, Designers, Videos  |  Best Website Builder for Digital Marketing Agencies, Travel Agencies, Interior Designs  |  Best AI website generator and creator - create a website with AI.  |  AI website builder and generator - AI-driven websites, limitless possibilities .  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. AI Website Builder | AI Website Generator | AI Website Builder | AI Website Maker | Website Generator AI