Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:02

Menu in XSL stylesheet?


Poster: Asa
Dated: Wednesday December 1 2004 - 14:05:57 GMT

Hi,

I'm really interested in using the dynamic menu and although it works perfectly fine with HTML pages, I want to create a section on my site based on XML data and an XSL stylesheet. I've tried copying the JavaScript straight into the stylesheet but when I visit the XML page, I just "Line 1 Char 1 Syntax Error".

Any ideas?

Regards, Asa


Poster: Ruth
Dated: Wednesday December 1 2004 - 18:02:32 GMT

What javascript? The call for the menu? I don't know xml, but I do remember having to use something about cdata around javascript for some reason. The only site I know that is xml and uses the menu is http://www.mercuryexposure.org which uses <![CDATA[ tags. Sorry, I can't be more help.

Ruth


Poster: Asa
Dated: Wednesday December 1 2004 - 23:42:05 GMT

Thanks for the site. I've got it to work in IE by pasting the javascript lines into the XSL document but sadly Mozilla is still having none of it.

Asa

_d.write in JS Libs


Poster: Bischoff
Dated: Monday December 6 2004 - 10:36:48 GMT

Hi Asa,
I have the same problem concerning the Mozilla and co. browsers. The reason for this is, that inside the Milonic JS libraries, which you import inside the XSL document are including several document.write commands.

First step of removing document.write is to change the import from :

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>

to :
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript src="mmenudom.js" type=text/javascript></script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>

Than Netscape 4 is not working any more, but who cares?

IE can handle this. Mozilla can't. So the same urgent problem for me. How to avoid this document.write. To rewrite the milonic_src.js and the mmenudom.js is above my knowledge..... :?

So, if any of the Milonic peaple whatches this conversation, please answer.....


Poster: Asa
Dated: Monday December 6 2004 - 11:30:06 GMT

Thanks for the reply, Bischoff.

Found Mozilla's explanation: http://www.mozilla.org/projects/xslt/faq.html Sadly no real solution and I don't envy the guys at Milonic trying to find an alternative to something as basic as document.write! I just can't believe Mozilla doesn't allow it, it's ridiculous.

For now, I'll use normal menu hyperlinks for Mozilla with

Quote:
<xsl:if test="system-property('xsl:vendor')='Transformiix'">
<!-- Mozilla specific markup -->
</xsl:if>


but if someone here can edit the javascript to support it, at least two people would be very grateful! Incidentally, I'm using v3 if that's any easier to work with.

Cheers, Asa


Poster: Ruth
Dated: Monday December 6 2004 - 14:15:14 GMT

What would be really helpful is a url to a page with your xsl and xml and the menu so that someone with more knowledge can check it out and see the problem and the browsers that are getting the error.

Ruth


Poster: Bischoff
Dated: Monday December 6 2004 - 16:56:18 GMT

Please have a look at: http://www.naturheilmagazin.de/Demo/Rueckbildung/kurs.xml

Kerstin Bischoff


Poster: Ruth
Dated: Monday December 6 2004 - 17:47:28 GMT

Kerstin
If you're using version 5 could you repost your first response to Asa in the Support Section for that version? I went to the page, but I get nothing but errors when using IE5.5. It shows text such as images/spacer.gif, images/abstand.gif This is not really something I would know about, but I thought if a page were posted someone with more knowledge might be able to help. So, if you could repost your information in Help and Support Version 5, perhaps under XML, XSL and Version 5 as the title or something so they know what's being questioned. Thanks

Asa,
are you using version 3 of the menu? That version is no longer supported, it is very out of date and most of us don't even know the parameters involved with it, so I'm not sure anyone can help with your situation. If you can upgrade it might be better, especially since Version 5 is more in line with all the new developments in browsers and web browsing.

Ruth