why doesnt index page appear in FF and IE

Discussion in 'CSS' started by friendships, Mar 19, 2009.

  1. #1
    hi
    i just want to ask why it doent work in both of the FF and IE and work in Opera.
    in FF and IE only the background who appear .
    the page is
    this
    please help
    thanks
     
    friendships, Mar 19, 2009 IP
  2. fightrsi

    fightrsi Guest

    Messages:
    29
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you take out this line, it'll work. I didn't read what the javascript file does.
     
    fightrsi, Mar 19, 2009 IP
  3. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #3
    looks like you need to modify the javascript prior to that line.... the <script> prior should be
    script type="text/javascript"

    and since you are using XHTML, you will have to encode/escape the javascript for that section.
    here's an example from W3C

    
    <script type="text/javascript"><![CDATA[
    document.write("Hello World!")
    //]]></script>
    
    Code (markup):
    http://www.w3schools.com/TAGS/tag_script.asp

    after that, you should try change the line you posted to using a closing tag.
    <script type="text/javascript" src="js/boxOver.js"> </script>
     
    shallowink, Mar 19, 2009 IP
  4. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #4
    Actually, the problem is simpler than that... Opera will allow you to use self closing on any tag, which is the proper behavior in a XHTML doctype... both FF and IE will not 'self close' the script tag even in a XHTML doctype, partly becuase IE doesn't "really" know what XHTML is, partly becuase FF pays more attention to mime type than declarations in the file itself.

    As such, script is opened, and never closed by that line.

    Instead of:
    <script type="text/javascript" src="js/boxOver.js" />

    Use:
    <script type="text/javascript" src="js/boxOver.js"></script>

    That's it.
     
    deathshadow, Mar 20, 2009 IP
  5. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #5
    Nice explanation.
    And, that is proper behavior. The server response header's content type trumps all else.

    cheers,

    gary
     
    kk5st, Mar 20, 2009 IP
  6. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #6
    I thought that was it, but it wouldn't hurt to declare js on the inline code and escape it.
     
    shallowink, Mar 20, 2009 IP
  7. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #7
    XHTML 1.0 can be served as either, self closing SHOULD be valid XHTML, so I'm with opera on that one.
     
    deathshadow, Mar 20, 2009 IP