HTML characters in the JS code from ASP and MS SQL

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Mindjogger
Beginner
Beginner
Posts: 1
Joined: Wed Dec 20, 2006 8:07 pm

HTML characters in the JS code from ASP and MS SQL

Post by Mindjogger »

Hello,

I am trying to get the dhtlm menue to get running on our server and have some trouble with the DB generated Javascript code.

I have downloaded:
Milonic DHTML Menu - JavaScript Website Navigation System.
Version 5.770 - Built: Thursday February 1 2007 - 11:28

In our DB we have Japanes characters which are HTML-encoded and looking like:
製品の特徴と

USing this inside of the JS code I am agry to run into trouble because of the ; appearing int the strings for the name/label:
aI("fontsize=18px;fontstyle=italic;showmenu=My Milonic;text=会社概要");
or
aI("text=consulting &  services;url=../text.asp?PageId=678;tooltip=here you get it;");


Does anyone have a expirience with something like this?
Any recommendation if it is needed to mask the html or what to do?
Thank you

Bernhard
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi,

Back Quotes may be your friend in this instance.

If you need to include multiple ; and = characters, this tend to break the structure of aI strings.

To combat this enclose anything that will break the structure inside back quotes, like this:

aI("text`I can include ;;;and === and style="font-color:red;background:blue;" because of back quotes`;url=link.html;");

HTH,
Andy
Post Reply