SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Weird error caused by JavaScript?

    Hi all,

    I'm getting this very weird display when I try and use the following code. All of the code is being printed to the browser, but Internet Explorer 6 isn't displaying it.

    Here's index.html:
    Code:
    <html>
    <head>
    <title></title>
    
    <script language="JavaScript">
    <!--
    // Define the header image source and ALT
    // attributes
    headImgFile = "clients.gif";
    headImgAlt = "Client List";
    //-->
    </script>
    
    <!--#include virtual="/kevinoc/v2/includes/header.html"--><font size="2"><p>Here is a parial list of clients:</p>
    <p align="center">RE/MAX<br>
    Motorola<br>
    Ameritech<br>
    Pharmacia<br>
    NationaLease<br>
    Royal Alliance<br></p></font><!--#include virtual="/kevinoc/v2/includes/footer.html"-->
    Here's header.html:
    Code:
    <script language="JavaScript" src="java/java.js">
    <base src="http://www.justforwebmasters.com/v2/">
    <base href="http://www.justforwebmasters.com/v2/">
    </head>
    <body bgcolor="#CCCCCC" text="#000000" link="#000099" vlink="#6666FF" alink="#6666FF" topmargin="0" leftmargin="0" rightmargin="0" spacing="0" marginwidth="0" marginheight="0" bottommargin="10">
    <basefont face="Verdana,Arial,Helvetica">
    
    <table width="760" cellspacing="0" cellpadding="2" border="0">
    <tr>
        <td background="images/layout/blueblank.gif"><p align="center"><font size="3" color="#FFFFFF"><b>Leadership Consulting&nbsp;&nbsp;&nbsp;&nbsp;Professional Speaking&nbsp;&nbsp;&nbsp;&nbsp;Confidential Executive Coaching</b></font></p></td>
    </tr>
    </table>
    <table width="760" cellspacing="0" cellpadding="0" border="0">
    <tr height="130">
        <td width="128"><img src="images/layout/r1c1.gif" height="130" width="128" alt="Picture" border="0"></td>
        <td width="8"><img src="images/layout/r1c2.gif" height="130" width="8" alt="" border="0"></td>
        <td width="208"><img src="images/layout/r1c3.gif" height="130" width="208" alt="Books: Profit-Ability, The Communication Coach, and When All Else Fails" border="0"></td>
        <td width="208"><img src="images/layout/r1c4.gif" height="130" width="208" alt="John Doe and Associates, Ltd." border="0"></td>
        <td width="208"><img src="images/layout/r1c5.gif" height="130" width="208" alt="End Cap" border="0"></td>
    </tr>
    </table>
    <table width="760" height="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
        <td width="130" valign="top">
         <table width="100%" cellspacing="0" cellpadding="0" border="0">
         <tr height="27">
             <td colspan="2"><img src="images/layout/r2c1.gif" height="27" width="130" alt="Site Contents:" border="0"></td>
         </tr>
         <tr>
             <td><a href="/"><img src="images/layout/nav/home.gif" height="26" width="128" alt="Home Page" border="0"></a><br>
              <a href="about/"><img src="images/layout/nav/about.gif" height="26" width="128" alt="About" border="0"></a><br>
              <a href="seminars/"><img src="images/layout/nav/seminars.gif" height="26" width="128" alt="Seminars" border="0"></a><br>
              <a href="services/"><img src="images/layout/nav/services.gif" height="26" width="128" alt="Services" border="0"></a><br>
              <a href="contact/"><img src="images/layout/nav/contact.gif" height="26" width="128" alt="*Contact*" border="0"></a><br>
              <a href="resources/"><img src="images/layout/nav/resources.gif" height="26" width="128" alt="Free Resources" border="0"></a><br>
              <a href="tools/"><img src="images/layout/nav/tools.gif" height="26" width="128" alt="Tools" border="0"></a><br>
              <a href="clients/"><img src="images/layout/nav/clients.gif" height="26" width="128" alt="Clients" border="0"></a><br>
              <a href="testimonials/"><img src="images/layout/nav/testimonials.gif" height="26" width="128" alt="Testimonials" border="0"></a></td>
             <td width="2" background="images/layout/blueblank.gif"><img src="images/layout/blank.gif" height="1" width="2" alt="Spacer" border="0"></td>
         </tr>
         <tr>
             <td width="128" background="images/layout/blueblank.gif"></td>
             <td width="2" background="images/layout/blueblank.gif"><img src="images/layout/blank.gif" height="1" width="2" alt="Spacer" border="0"></td>
         </tr>
         <tr height="8">
             <td colspan="2"><img src="images/layout/r4c1.gif" height="8" width="130" alt="End Cap" border="0"></td>
         </tr>
         </table></td>
        <td width="6" valign="top"><img src="images/layout/r2c2.gif" height="27" width="6" alt="Curve" border="0"></td>
        <td width="4"><img src="images/layout/blank.gif" height="1" width="4" alt="Spacer" border="0"></td>
        <td width="620">
         <table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
         <tr height="8">
             <td><img src="images/layout/blank.gif" height="8" width="1" alt="Spacer" border="0"></td>
         </tr>
         <tr height="35">
             <td><script language="JavaScript">
    <!--
    displayHeadImg();
    //-->
    </script></td>
         </tr>
         <tr>
             <td background="images/layout/content-bg.gif" valign="top">
              <table width="100%" cellspacing="0" cellpadding="5" border="0">
              <tr>
                  <td bgcolor="#FFFFFF" background="images/layout/content-bg.gif" valign="top">
                   <!-- ******************************* -->
                   <!-- *   BEGIN MAIN CONTENT AREA   * -->
                   <!-- ******************************* -->
    Here's the java.js file:
    Code:
    function displayHeadImg() {
    
    document.write('<img src="images/layout/headers/'+headImgFile+'" height="35" width="620" alt="'+headImgAlt+'" border="0">');
    
    }
    Does anybody know what is causing this? http://www.justforwebmasters.com/v2/index.html.

    Thanks in advance,
    Corbb
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!

  2. #2
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Actually - I am seeing SOME contnet ... not nothing.

    But have you tried turning table borders on, to see
    what's happening

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  3. #3
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi flawless,

    I have no idea what the problem was, but I juwt re-coded the page and it works (quite odd).

    Thanks for your help though!

    -Corbb
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!

  4. #4
    Perl/Mason Guru Flawless_koder's Avatar
    Join Date
    Feb 2002
    Location
    Gatwick, UK
    Posts
    1,206
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's ok - shame you lost the error- might have been nice to find out what it was.

    Flawless
    ---=| If you're going to buy a pet - get a Shetland Giraffe |=---

  5. #5
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Flawless:

    I still have page with the error...I'll go ahead and turn the borders on...if you're still interested in finding out what it was...http://justforwebmasters.com/v2/
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!

  6. #6
    The doctor is in... silver trophy MarcusJT's Avatar
    Join Date
    Jan 2002
    Location
    London
    Posts
    3,509
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, for one thing, DreamWeaver had this to say about it:
    Line 75 Col 14 : Removed an unnecessary </td> tag.
    Line 76 Col 10 : Removed an unnecessary </tr> tag.
    Line 136 Col 220 : Replaced an extra </P> tag with <P></P> to preserve spacing.
    Line 138 Col 145 : Split up tags that overlapped a <font> ... </font> pair.
    Line 138 Col 154 : Split up tags that overlapped a <center> ... </center> pair.
    Line 138 Col 159 : Closed a <b> tag that was left unclosed or overlapped other tags.
    Line 145 Col 13 : Removed an unnecessary </table> tag.
    Line 145 Col 18 : Removed an unnecessary </td> tag.
    Line 146 Col 5 : Removed an unnecessary </tr> tag.
    Line 147 Col 8 : Removed an unnecessary </table> tag.
    Line 75 Col 14 : Removed an unnecessary </td> tag.
    Line 76 Col 10 : Removed an unnecessary </tr> tag.
    Line 136 Col 220 : Replaced an extra </P> tag with <P></P> to preserve spacing.
    Line 138 Col 145 : Split up tags that overlapped a <font> ... </font> pair.
    Line 138 Col 154 : Split up tags that overlapped a <center> ... </center> pair.
    Line 138 Col 159 : Closed a <b> tag that was left unclosed or overlapped other tags.
    Line 145 Col 13 : Removed an unnecessary </table> tag.
    Line 145 Col 18 : Removed an unnecessary </td> tag.
    Line 146 Col 5 : Removed an unnecessary </tr> tag.
    Line 147 Col 8 : Removed an unnecessary </table> tag.


    (Similar stuff plus some pan-fried red herrings here!)
    Last edited by M@rco; Jul 13, 2002 at 06:46.
    MarcusJT
    - former ASP web developer / former SPF "ASP Guru"
    - *very* old blog with some useful ASP code

    - Please think, Google, and search these forums before posting!

  7. #7
    SitePoint Evangelist
    Join Date
    Dec 2000
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well!!!

    I'll go run it through HTMLTidy and see what it has to say...

    Thanks,
    Corbb O'Connor
    Looking for quality website design or database programming?
    Contact me for more information and a FREE quote!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •