Validate menu with parameters passed by GET method

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
asdru
Beginner
Beginner
Posts: 2
Joined: Mon Nov 19, 2007 1:15 pm

Validate menu with parameters passed by GET method

Post by asdru »

Hi all,
first of all... GREATE WORK WITH THIS FANTASTIC MENU'!

Now, my problem is this...
I need to pass via-menu GET Method parameter so my submenu urls are something like this:

Code: Select all

 aI("text=Rings;url=index.php?nav=objects&rings=rings;"); 
Now come my prob... I want to validate my HTML... All my errors depend on the "&" and I can't replace with "&" because ";" will end url string...

There's a way to validate that?

Regards,
Asdru
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Validate menu with parameters passed by GET method

Post by Ruth »

Hi,

Have you tried using the ampersand instead of the &? For example if you were to put in the text=objects&Rings; it would not consider the ; at the end of the ampersand as the end of the text string. Can you post a url so I can test things?

Ruth
asdru
Beginner
Beginner
Posts: 2
Joined: Mon Nov 19, 2007 1:15 pm

Re: Validate menu with parameters passed by GET method

Post by asdru »

Ruth wrote:Hi,

Have you tried using the ampersand instead of the &? For example if you were to put in the text=objects&Rings; it would not consider the ; at the end of the ampersand as the end of the text string. Can you post a url so I can test things?

Ruth
Can't post any link because I'm working on local computer...
Yes I tried... but like I wrote:
asdru wrote:I can't replace with "&" because ";" will end url string...
and menu isn't shown...
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Validate menu with parameters passed by GET method

Post by Ruth »

Hi,

Well, the w3c validator doesn't parse javascript so it should be ignoring it. If you have the menu on the page in script tags, then to force the validator to ignore it, try using cdata tags

Code: Select all

<script type="text/javascript"> 
// <![cdata[ 
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;


menu stuff

// ]]> 
</script> 


That should make it ignore the &. Without having something for experiment, that's all I can suggest. Since the validator doesn't read js, it shouldn't be reading the menu_data.js file, so I have to assume you have this on the page in script tags.
If this isn't the case, perhaps you can paste a sample page with your menu data file and I'll experiment.

Ruth
Post Reply