Results 1 to 5 of 5

Thread: document.write problem

  1. #1
    Join Date
    Apr 2006
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default document.write problem

    Code:
    /*
    
    www.a2h.8m6.net global menu. BOW DOWN.
    
    This should be the output:
    <map name="menu">
    <area href="http://www.a2h.8m6.net" alt="Home" coords="0,0,96,96">
    <area href="http://www.a2h.8m6.net/forums" alt="Forum" coords="97,0,193,96">
    <area href="http://www.a2h.8m6.net/gameon" alt="GAMEON" coords="194,0,290,96">
    <area href="http://www.a2h.8m6.net/blog.htm" alt="Blog" coords="291,0,387,96">
    <area href="http://www.a2h.8m6.net/art" alt="Art" coords="388,0,484,96">
    <area href="http://www.a2h.8m6.net/others" alt="Others" coords="485,0,581,96">
    </map>
    <img src="http://www.a2h.8m6.net/menu.gif" alt="Menu" usemap="#menu" width="581" HEIGHT="96" BORDER="0">
    
    */
    
    document.writeln("<map name=\"menu\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net\" alt=\"Home\" coords=\"0,0,96,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/forums\" alt=\"Forum\" coords=\"97,0,193,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/gameon\" alt=\"GAMEON\" coords=\"194,0,290,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/blog.htm\" alt=\"Blog\" coords=\"291,0,387,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/art\" alt=\"Art\" coords=\"388,0,484,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/others\" alt=\"Others\" coords=\"485,0,581,96\">");
    document.writeln("</map>");
    document.writeln("<img src=\"http://www.a2h.8m6.net/menu.gif\" alt=\"Menu\" usemap=\"#menu\" width=\"581\" HEIGHT=\"96\" BORDER=\"0\">");
    The menu does not output on http://www.a2h.8m6.net/hamachi ...

    I used this code to output that file:
    Code:
    <style type="text/javascript" src="http://www.a2h.8m6.net/menu.js"></script>
    Last edited by rctxtreme; 04-01-2007 at 08:10 AM.

  2. #2
    Join Date
    May 2006
    Location
    Sydney, Australia - Near the coast.
    Posts
    1,995
    Thanks
    0
    Thanked 8 Times in 7 Posts

    Default

    Have you tried instead of writeIn put write?
    Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
    Currently: enjoying the early holidays :)
    Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide

  3. #3
    Join Date
    Apr 2006
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    It was document.write but it didn't work so I just googled a generator...

    And it gave this.

    Well I did give what should come out in the commented area...

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,165
    Thanks
    44
    Thanked 3,239 Times in 3,200 Posts
    Blog Entries
    12

    Default

    Works here:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
    </head>
    <body>
    <script type="text/javascript">
    /*
    
    www.a2h.8m6.net global menu. BOW DOWN.
    
    This should be the output:
    <map name="menu">
    <area href="http://www.a2h.8m6.net" alt="Home" coords="0,0,96,96">
    <area href="http://www.a2h.8m6.net/forums" alt="Forum" coords="97,0,193,96">
    <area href="http://www.a2h.8m6.net/gameon" alt="GAMEON" coords="194,0,290,96">
    <area href="http://www.a2h.8m6.net/blog.htm" alt="Blog" coords="291,0,387,96">
    <area href="http://www.a2h.8m6.net/art" alt="Art" coords="388,0,484,96">
    <area href="http://www.a2h.8m6.net/others" alt="Others" coords="485,0,581,96">
    </map>
    <img src="http://www.a2h.8m6.net/menu.gif" alt="Menu" usemap="#menu" width="581" HEIGHT="96" BORDER="0">
    
    */
    
    document.writeln("<map name=\"menu\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net\" alt=\"Home\" coords=\"0,0,96,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/forums\" alt=\"Forum\" coords=\"97,0,193,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/gameon\" alt=\"GAMEON\" coords=\"194,0,290,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/blog.htm\" alt=\"Blog\" coords=\"291,0,387,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/art\" alt=\"Art\" coords=\"388,0,484,96\">");
    document.writeln("<area href=\"http://www.a2h.8m6.net/others\" alt=\"Others\" coords=\"485,0,581,96\">");
    document.writeln("</map>");
    document.writeln("<img src=\"http://www.a2h.8m6.net/menu.gif\" alt=\"Menu\" usemap=\"#menu\" width=\"581\" HEIGHT=\"96\" BORDER=\"0\">");
    </script>
    </body>
    </html>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2006
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I've realised the problem - I used <style>!

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
  •