I finally got it working! Thanks Dan, for pointing out the embarassingly obvious ... *blushes*
function getBrowserWidth()
{
if (window.innerWidth)
{
return window.innerWidth;
}
else if (document.documentElement && document.documentElement.clientWidth != 0)
{...
I've tested with this alert rather than a statement:
alert(theElement + ' \ \ \ ' + theWidth + 'px');
... and the popup gives me this:
[Object HTMLDivElement] 1245px
(Up and working now, on the page I've linked to furter up!)
The object is correct, as far as I can tell, but it's hardly...
I have this JavaScript that should set the class attribute of the DIV#main to e.g. "1200pluss" or whatever, depending on window width -- but I can't get it to work! This is the script:
function getBrowserWidth()
{
if (window.innerWidth)
{
return window.innerWidth;
}
else...
I have a problem with a bit of XSLT that is parsing a submenu twice. What I need is this:
<ul id="meny">
<li><a href="">Menu 1</a></li>
<li><a href="">Menu 2</a>
<ul>
<li><a href="">Menu 2-1</a></li>
<li><a href="">Menu 2-2</a></li>
</ul>
</li>
<li><a href="">Menu...
All solved:) In case you want to know, this is the bit that did it:
<xsl:template match="FOLDERS/*" mode="MAIN_MENU">
<xsl:variable name="url">
<xsl:choose>
<xsl:when test="starts-with(LABEL, 'http://')"><xsl:value-of select="LABEL"/></xsl:when>
<xsl:otherwise><xsl:value-of...
As soon as the server was up again, I tried this out, but I couldn't make it work:\ I'm not too sure I implemented it corectly, though ...
I've pasted the complete XSLT sheet below, in case that might help any:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet...
I want an unordered list where each list item can be given a different class, something like this:
<ul>
<li class="red">Item 1</li>
<li class="blue">Item 2</li>
...
<li class="yellow">Item 8</li>
</ul>
I can generate the list fine, but I haven't figured out yet how to assign a different...
Hi all!
I have something of a basic question. It seems I was even more out of practice than I thought when I took on this job ...
The XSLT below generates a menu in the form of an Unordered List. I've managed to make it appear where I want it, but I also need to assign a different .CLASS to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.