Fork me on GitHub

HTML code doesn't work  Bottom

  • works fine on a basic HTML page but craps out when I try it in postnuke under an admin message.

    Code

    <script>

    // Script Source: CodeLifter.com
    // Copyright 2003
    // Do not remove this notice.

    // SETUPS:
    // ===============================

    // Set the horizontal and vertical position for the popup

    PositionX = 100;
    PositionY = 100;

    // Set these value approximately 20 pixels greater than the
    // size of the largest image to be used (needed for Netscape)

    defaultWidth  = 500;
    defaultHeight = 500;

    // Set autoclose true to have the window close automatically
    // Set autoclose false to allow multiple popup windows

    var AutoClose = true;

    // Do not edit below this line...
    // ================================
    if (parseInt(navigator.appVersion.charAt(0))>=4){
    var isNN=(navigator.appName=="Netscape")?1:0;
    var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
    var optNN='scrollbars=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
    var optIE='scrollbars=no,width=150,height=100,left='+PositionX+',top='+PositionY;
    function popImage(imageURL,imageTitle){
    if (isNN){imgWin=window.open('about:blank','',optNN);}
    if (isIE){imgWin=window.open('about:blank','',optIE);}
    with (imgWin.document){
    writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
    writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
    writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
    writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
    writeln('width=100-(document.body.clientWidth-document.images[0].width);');
    writeln('height=100-(document.body.clientHeight-document.images[0].height);');
    writeln('window.resizeTo(width,height);}');writeln('if (isNN){');      
    writeln('window.innerWidth=document.images["George"].width;');writeln('window.innerHeight=document.images["George"].height;}}');
    writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
    if (!AutoClose) writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
    else writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur="self.close()">');
    writeln('<img name="George" src='+imageURL+' style="display:block"></body></html>');
    close();       
    }}

    </script>

      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
        <tr>
          <td width="100%" colspan="7" align="center"><b>2002 Chrysler Prowler Roadster</b></td>
        </tr>
        <tr>
          <td width="100%" align="center" colspan="7">
          <img border="0" src="http://globeautosales.com/images/topics/prowler/top.jpg" alt="2002 Chrysler Prowler Roadster" width="603" height="358"></td>
        </tr>
        <tr>
          <td width="100%" colspan="7" align="center">Click To Enlarge</td>
        </tr>
        <tr>
          <td width="15%">&nbsp;</td>
          <td width="15%"><a href="javascript:popImage('http://globeautosales.com/images/topics/prowler/prowler_1.jpg','2002 Chrysler Prowler Roadster')">
    <img src="p1.jpg" border="0" width="130" height="110">
    </a></td>
          <td width="14%">&nbsp;</td>
          <td width="14%">
          <a href="javascript:popImage('http://globeautosales.com/images/topics/prowler/prowler_2.jpg','2002 Chrysler Prowler Roadster')">
    <img src="p2.jpg" border="0" width="130" height="110"></a></td>
          <td width="14%">&nbsp;</td>
          <td width="14%">
          <a href="javascript:popImage('http://globeautosales.com/images/topics/prowler/prowler_3.jpg','2002 Chrysler Prowler Roadster')">
    <img src="p3.jpg" border="0" width="130" height="110"></a></td>
          <td width="14%">&nbsp;</td>
        </tr>
        <tr>
          <td width="100%" colspan="7">&nbsp;</td>
        </tr>
        <tr>
          <td width="15%">&nbsp;</td>
          <td width="15%">
          <a href="javascript:popImage('http://globeautosales.com/images/topics/prowler/prowler_4.jpg','2002 Chrysler Prowler Roadster')">
    <img src="p4.jpg" border="0" width="130" height="110"></a></td>
          <td width="14%">&nbsp;</td>
          <td width="14%">
          <a href="javascript:popImage('http://globeautosales.com/images/topics/prowler/prowler_5.jpg','2002 Chrysler Prowler Roadster')">
    <img src="p5.jpg" border="0" width="130" height="110"></a></td>
          <td width="14%">&nbsp;</td>
          <td width="14%">
          <a href="javascript:popImage('http://globeautosales.com/images/topics/prowler/prowler_6.jpg','2002 Chrysler Prowler Roadster')">
    <img src="p6.jpg" border="0" width="130" height="110"></a></td>
          <td width="14%">&nbsp;</td>
        </tr>
        <tr>
          <td width="100%" colspan="7">&nbsp;</td>
        </tr>
      </table>

    <div align="center">
      <center>
      <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="900" id="AutoNumber2">
        <tr>
          <td width="900" colspan="10" align="center"><b>Equipment</b></td>
        </tr>
        <tr>
          <td width="108"><b>Engine:</b></td>
          <td width="9">&nbsp;</td>
          <td width="80">V6 3.5 Liter</td>
          <td width="61">&nbsp;</td>
          <td width="192">Air Conditioning</td>
          <td width="4">&nbsp;</td>
          <td width="176">Tilt Wheel</td>
          <td width="4">&nbsp;</td>
          <td width="157">Leather</td>
          <td width="109">&nbsp;</td>
        </tr>
        <tr>
          <td width="108"><b>Transmission:</b></td>
          <td width="9">&nbsp;</td>
          <td width="80">Automatic</td>
          <td width="61">&nbsp;</td>
          <td width="192">Power Steering</td>
          <td width="4">&nbsp;</td>
          <td width="176">Cruise Control</td>
          <td width="4">&nbsp;</td>
          <td width="157">Power Seat</td>
          <td width="109">&nbsp;</td>
        </tr>
        <tr>
          <td width="108"><b>Exterior Color:</b></td>
          <td width="9">&nbsp;</td>
          <td width="80">Gold</td>
          <td width="61">&nbsp;</td>
          <td width="192">Power Windows</td>
          <td width="4">&nbsp;</td>
          <td width="176">AM/FM Stereo</td>
          <td width="4">&nbsp;</td>
          <td width="157">Premium Wheels</td>
          <td width="109">&nbsp;</td>
        </tr>
        <tr>
          <td width="108"><b>Interior Color:</b></td>
          <td width="9">&nbsp;</td>
          <td width="80">Grey/Gold</td>
          <td width="61">&nbsp;</td>
          <td width="192">Power Door Locks</td>
          <td width="4">&nbsp;</td>
          <td width="176">Cassette</td>
          <td width="4">&nbsp;</td>
          <td width="157">Passenger Air Bag Switch</td>
          <td width="109">&nbsp;</td>
        </tr>
        <tr>
          <td width="108"><b>Miles:</b></td>
          <td width="9">&nbsp;</td>
          <td width="80">6,100</td>
          <td width="61">&nbsp;</td>
          <td width="192">Power Mirrors</td>
          <td width="4">&nbsp;</td>
          <td width="176">6 Disc CD Changer</td>
          <td width="4">&nbsp;</td>
          <td width="157">Convertible</td>
          <td width="109">&nbsp;</td>
        </tr>
        <tr>
          <td width="108"><b>Selling Price:</b></td>
          <td width="9">&nbsp;</td>
          <td width="80">$44,995.00</td>
          <td width="61">&nbsp;</td>
          <td width="192">Keyless Entry</td>
          <td width="4">&nbsp;</td>
          <td width="176">Dual Front Air Bags</td>
          <td width="4">&nbsp;</td>
          <td width="157">Rear Wheel Drive</td>
          <td width="109">&nbsp;</td>
        </tr>
      </table>
      </center>
    </div>


    I've allowed just about every HTML tag but it craps out. Any ideas?

    Thanks!
  • Hi there,

    I had a play with this and it will work if you put it in a HTML block, actually the admin mesages code will work if you have an instance in a HTML block as well.

    The thing to do will be to find (by trial and error) what part that has to be in a HTML block to make the admin message instance work. Actually I would just use a center block to do this and not even use the admin messages - you can add permissions to the blocks as well.

    Hope this helps.

    Kindest regards
    Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment
  • Lobos

    Hi there,

    I had a play with this and it will work if you put it in a HTML block, actually the admin mesages code will work if you have an instance in a HTML block as well.

    The thing to do will be to find (by trial and error) what part that has to be in a HTML block to make the admin message instance work. Actually I would just use a center block to do this and not even use the admin messages - you can add permissions to the blocks as well.

    Hope this helps.

    Kindest regards
    Lobos


    thanks, it worked great!
  • Glad to have helped! I have always found the admin messages to be a bit "quirky" and due to this I just use blocks instead.

    Kindest regards
    Lobos

    --
    -Lobos
    Professional PHP Framework Services: Concept, Development and Deployment

This list is based on users active over the last 60 minutes.