(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:
Fine Bootstrap Page Templates - Video List Exceptional Bootstrap Mobile Template Set  |  Prime Simple Website Builder Review  |  Great Free Page Layouts Set  |  Super Simple Website Builder Review  |  Awesome Mobile-friendly Website Design Review  | 
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 | Best AI Website Builder | Free AI Website Generator | Website Generator AI | AI web design generator