Click to See Complete Forum and Search --> : Javascript Dropdown Menu in not functioning in XML
moporho
10-15-2008, 11:51 AM
My javascript dropdown menu will not function in XML. How can I get it to function?
Here are the two script tags I am trying to enter into the xsl file:
In the Head:
<script type="text/javascript" language="JavaScript1.2" src="um_menu.js"></script>
In the body of the menu placement:
<script type="text/javascript" language="JavaScript1.2" src="menu.js"></script>
If anyone has a suggestion please help me??
Thanks,
M
opifex
10-15-2008, 01:11 PM
you can enclose the script in CDATA like this in the <head> :
<script type="text/javascript><![CDATA[
....your javascript....
]]></script>
and in CDATA inside xsl comment tags in the <body> :
<script type="text/javascript>
<xsl:comment><![CDATA[
....your javascript....
]]> </xsl:comment>
</script>
moporho
10-15-2008, 02:00 PM
I did just that and it wiped my menu and row off the page. I input " after the text/Javascript . should I put language="Javascript ...
?
M
opifex
10-15-2008, 03:40 PM
my typo!!!!
of course it's <script type="text/javascript">
but i think i missed something.... this is in your xml or the xsl?
moporho
10-15-2008, 05:59 PM
I have it in xsl
opifex
10-15-2008, 06:25 PM
ok, then i didn't mess it up (or at least i don't think so).
it would be helpful if you could post the part of the code that isn't working or put everything in a zip so people can take a look at it.
moporho
10-15-2008, 09:49 PM
Cool I will put the the files in zip. My objective is to have the XSL look exactly like the html. The menu is not functional in the XSL/XML.
Thanks for your time,
I love this stuff but boy has this one have me spinning!
M
opifex
10-16-2008, 08:50 PM
i see what you are going after, and it would be a whole lot easier if you got rid of the javascript menu. you can do the menu in xml also. if you really want to go all the way, write an xslt (template) to hold the repeatable items (both menus, header,footer) and call each page's content.
your other option would be to write a "normal" (x)html page and parse your xml data into the content. this would probably be the easier route is you're not used to working with xml.