Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by Tiram

  1. Tiram

    Trying to set the attribute to an element without much success:\

    And amazingly enough, it worked for me too ;D Thanks a lot!
  2. Tiram

    Trying to set the attribute to an element without much success:\

    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) {...
  3. Tiram

    Trying to set the attribute to an element without much success:\

    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...
  4. Tiram

    Trying to set the attribute to an element without much success:\

    I tried using "className" already, and couldn't make it work. Maybe the fault is somewhere else?
  5. Tiram

    Trying to set the attribute to an element without much success:\

    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...
  6. Tiram

    Menu items parsed twice

    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...
  7. Tiram

    :choose CSS-class

    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...
  8. Tiram

    :choose CSS-class

    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...
  9. Tiram

    :choose CSS-class

    Unfortunately I can't your suggestion right now, seeing as the production server is down:\ I'll be back when it is up and running again!
  10. Tiram

    :choose CSS-class

    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...
  11. Tiram

    :choose CSS-class

    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...

Part and Inventory Search

Back
Top