Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:24
Spaces in aI cause inaction
Poster: gardenguy
Dated: Tuesday July 22 2003 - 21:49:45 BST
Unless there is something wrong with my editor (and there have been some issues), it appears that I can NOT have any spaces in the individual aI array menu listings. For example:
Quote:
aI("text=Eating; status=Find a place to eat;url=http://hinsdale.sallyanddavid.com/code/list.php?typevalue=Restaurant");
is broken such that the status bar shows the url, not the text "Find a place to eat". If I delete that single space after "Eating;" and before "status", then the text appears in the status bar. In a similar way, if I put a space after "place to eat;" and before "url=" then the link will not click thru.
Is it just me?
Thanks
David
Poster: Andy
Dated: Tuesday July 22 2003 - 23:01:58 BST
It's the way the menu works.
If it finds a space it includes it as a charcter so "status" becomes " status" and isn't a match anymore. We could trim the spaces but it would add a delay to the rendering of the menu.
If it's a real problem we might look at it again.
Cheers
Andy
It's a feature
Poster: gardenguy
Dated: Wednesday July 23 2003 - 0:30:11 BST
Andy,
My intent was to share what I learned and hope this gets in that manual we are all axiously awaiting (holding breath now).
Thanks so much for your hard work.
David
Poster: Hergio
Dated: Wednesday July 23 2003 - 3:50:54 BST
Andy,
I haven't had alot of time lately to experiment but I wanted to throw out a question to you about this topic. How would you put a semi colon into a menu label, or a status message since your code looks for the semicolon? I am assuming you parse up the string and look for matches like ";keyword=" and if not, you assume the semi colon and subsequent words are still part of the previous keyword's value.
Just a little thing that popped into my head and I haven't had a chance to test it myself.
Poster: Andy
Dated: Wednesday July 23 2003 - 9:18:34 BST
This is something that we really need documentation for.
The docs will also need to be quite comprehensive now because the menu can do so much more, it is getting quite complex.
Anyway, we have dealt with this problem. If you need to add any html entity such as none breaking spaces etc, they all include a semi colon. This doesn't really matter as the menu is smart enough to know that it is a HTML entity and deal with it. Like this:
Code:
aI("text=Semi colon = ; space = ;showmenu=menu");
However, if you just need to include a semi colon as plain text, you'll need to enclose it in backquotes like this:
Code:
aI("text=Menu Item;status=`semi ; ; ; colon`");
This is also used for when you need to include html inside a menu item.
Cheers
Andy
Poster: jbreslow
Dated: Wednesday November 5 2003 - 17:32:15 GMT
Does surrounding the semi-colon in backquotes apply to a semi-colon that is in a url?
I.E.
http://mysite.com/command.shtml?calid=F ... 2_weekview
Poster: Andy
Dated: Wednesday November 5 2003 - 17:38:05 GMT
It should do.
Try:
Code:
aI("text=Test Item;url=`http://mysite.com/command.shtml?calid=FA03-EPI2;FA03-HA2;FA03-HEM2;FA03-HIST2;FA03-ICM2;FA03-SBS2&view=fa03ms2_weekview`;");
Cheers
Andy
Poster: jbreslow
Dated: Wednesday November 5 2003 - 17:51:04 GMT
Yeah, that didn't work. Here is what the returning URL is when I tried to open it into a new window.
http://mysite.com/website/'http://calen ... ;FA03-ICM2