How can we adapt this object to firefox?

Discussion in 'JavaScript' started by bluesharki, Aug 22, 2007.

  1. #1
    Hello friends,
    I can't figure out one thing in firefox.If you help me I will be happy than now :) Because I'm really confused.

    Let's start:
    I can't change stylesheets object hrf in firefox.


    document.styleSheets[0].href = "orange.css"
    alert(document.styleSheets[0].href);


    Best Regards,
    Can
     
    bluesharki, Aug 22, 2007 IP
  2. bluesharki

    bluesharki Peon

    Messages:
    57
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Fixed :)

    I hope this is help you.

    Now you can call document.getElementById(id).href = "orange.css";
    in orange css <link rel=stylesheet href='blue.css' id='id'>

    document.getElementById(id).href = "orange.css";
     
    bluesharki, Aug 22, 2007 IP