Xhtml and javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wr657
    New Member
    • Nov 2006
    • 8

    Xhtml and javascript

    Hi

    I have made a norwegian web page called Bomloveven.

    The page is xhtml-based and also contains some
    javascript that isn't viewable in any browser.
    However, the principle was recommended
    concerning xhtml validation.

    The code is
    <script type="text/javascript">

    <![CDATA[
    // src='http://www2.nrk.no/tjenester/nrkpadinside/padinside.aspx?
    id=hordaland&an tall=10&bredde= 160&js=1&pop=0' >
    ]]>

    </script>

    In the beginning I used:

    <script language="JavaS cript"
    src="http://www.bomlo-nytt.no/style/jsfeed.php">
    </script <http://www.bomlo-nytt.no/style/jsfeed.php">

    But this code was not validated.

    Does someone have a solution?
  • b1randon
    Recognized Expert New Member
    • Dec 2006
    • 171

    #2
    Originally posted by wr657
    Hi

    I have made a norwegian web page called Bomloveven.

    The page is xhtml-based and also contains some
    javascript that isn't viewable in any browser.
    However, the principle was recommended
    concerning xhtml validation.

    The code is
    <script type="text/javascript">

    <![CDATA[
    // src='http://www2.nrk.no/tjenester/nrkpadinside/padinside.aspx?
    id=hordaland&an tall=10&bredde= 160&js=1&pop=0' >
    ]]>

    </script>

    In the beginning I used:

    <script language="JavaS cript"
    src="http://www.bomlo-nytt.no/style/jsfeed.php">
    </script <http://www.bomlo-nytt.no/style/jsfeed.php">

    But this code was not validated.

    Does someone have a solution?
    What are you trying to do? The second code block won't validate because your </script> tag isn't properly closed. What is the purpose? Your code seems to be terribly wrong.

    Comment

    • wr657
      New Member
      • Nov 2006
      • 8

      #3
      The problem in my first post is fixed, but I have another one.
      The Opera browser doesn't show my pages as I want it to do.

      In Explorer the page http://www.bomloveven.com/hordaland.html is shown as intended in 3
      columns. The right column has content (header "NRK Hordaland) made with
      javascript. In Opera the third column takes a step down under the first column.

      The xhtml-code is:

      <div id="hogre">

      <script type="text/javascript"
      src='http://www2.nrk.no/tjenester/nrkpadinside/padinside.aspx?
      id=hordaland&an tall=10&bredde= 160&js=1&pop=0' >
      </script>

      </div>

      The css-code is:

      #hogre {
      width: 11em;
      background-color: #FFE4C4;
      margin: 0em;
      padding-top: 1em;
      padding-left: 1em;
      padding-bottom: 1em;
      }

      I have found that if I substitute the javascript above with clean text, let's say
      the word "Test", and delete "width" in the css-code above, "Test" appears
      where the javascript was intended to appear. So I guess there may be
      something odd in the relationship between javascript and Opera?

      Comment

      Working...