(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:
Website Design Tool - Website Development Software Best Free QR Code Generators 2023  |  Whitelabel Website Builder - HTML Code Generator  |  Landing Page Maker - Landing Page Maker  |  Nice and Simple HTML Website Maker with HTML Code Export  |  No Coding Website Builder - Easiest Website Builder  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | AI Website Builder | Best AI Website Builder | Free AI Website Builder | Free AI Website Generator