#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Location
    NYC
    Posts
    9
    Rep Power
    0

    Iframes, Javascript and NN6


    Hi all, I just tried attaching an html file (my bad)... so lost the thread.... ahhh, lovely... so, anyway, here's the problem.

    I'm trying to rotate different ad sizes into different parts of a page on refresh. I've got it working everywhere except NN6, so I'm thinking the IFRAMES are to blame. Can someone take a look at the code I've got to see if I've done anything drastically stupid? FYI, I'm emulating the NYTimes.com website's ad rotation (they've got it working, but you can't see how by viewing source)... Please holler if you need more info... this is one heck of a challenge! Thanks!
    _______________________________

    <html>
    <head>
    <title>Ad Test</title>
    <style>
    BODY, P, TD {font-family: verdana; font-size: 10px;}
    </style>
    <script language="javascript">

    var advert2=""

    var0="<!--Middle ad type : bigad_v --><table border='0' cellpadding='0' cellspacing='0' align='left'><tr><td align='left'><div align='center'><font face='Arial, Helvetica, Sans Serif' color='#999999' size='-2'>Advertisement</font></div><!-- ADXINFO classification='bigad_v' campaign='cingular10-nyt2'--><IFRAME SRC='http://ad.doubleclick.net/adi/N1974.nytimes/B1028662.6;sz=240x400;ord=2002.08.13.14.32.32?' WIDTH=242 HEIGHT=402 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'><scri + pt language='JavaScript1.1' SRC='http://ad.doubleclick.net/adj/N1974.nytimes/B1028662.6;abr=!ie;sz=240x400;ord=2002.08.13.14.32.32?'><\/SCRIPT><NOSCRIPT><A HREF='http://ad.doubleclick.net/jump/N1974.nytimes/B1028662.6;abr=!ie4;abr=!ie5;sz=240x400;ord=2002.08.13.14.32.32?'><IMG SRC='http://ad.doubleclick.net/ad/N1974.nytimes/B1028662.6;abr=!ie4;abr=!ie5;sz=240x400;ord=2002.08.13.14.32.32?' BORDER=0 WIDTH=240 HEIGHT=400 ALT='Alt Text'></A></NOSCRIPT></IFRAME><br clear='all'></td><td rowspan='4' width='15' align='left'><img src='http://graphics.nytimes.com/images/misc/spacer.gif' width='15' height='1' border='0'/></td></tr> <tr> <td><br><br></td></tr></table>"
    var1="<!--Middle ad type : tower_left --><table border='0' cellpadding='0' cellspacing='0' align='left'><tr><td align='center'><div align='center'><font face='Arial, Helvetica, Sans Serif' color='#999999' size='-2'>Advertisement</font></div><!-- ADXINFO classification='tower_right'--><IFRAME SRC='tower.gif' WIDTH=170 HEIGHT=820 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'><scri + pt language='JavaScript1.1' SRC='tower.gif'><\/SCRIPT><NOSCRIPT><A HREF='http://ad.doubleclick.net/jump/N1974.nytimes/B1028662.6;abr=!ie4;abr=!ie5;sz=160x800;ord=2002.08.13.14.32.32?'><IMG SRC='tower.gif' BORDER=0 WIDTH=160 HEIGHT=800 ALT='Alt Text'></A></NOSCRIPT></IFRAME><br clear='all'></td><td rowspan='4' width='15' align='left'><img src='http://graphics.nytimes.com/images/misc/spacer.gif' width='15' height='1' border='0'/></td></tr> <tr> <td><br><br></td></tr></table>"
    var2="<!--Middle ad type : cnet_center--><table border='0' cellpadding='0' cellspacing='0' align='center'><tr><td align='center'><div align='center'><font face='Arial, Helvetica, Sans Serif' color='#999999' size='-2'>Advertisement</font></div><!-- ADXINFO classification='cnet_center'--><IFRAME SRC='untitled_cnet.gif' WIDTH=340 HEIGHT=290 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'><scri + pt language='JavaScript1.1' SRC='untitled_cnet.gif'><\/SCRIPT><NOSCRIPT><A HREF='http://ad.doubleclick.net/jump/N1974.nytimes/B1028662.6;abr=!ie4;abr=!ie5;sz=336x280;ord=2002.08.13.14.32.32?'><IMG SRC='untitled_cnet.gif' BORDER=0 WIDTH=336 HEIGHT=280 ALT='Alt Text'></A></NOSCRIPT></IFRAME><br clear='all'></td><td rowspan='4' width='15' align='left'><img src='http://graphics.nytimes.com/images/misc/spacer.gif' width='15' height='1' border='0'/></td></tr> <tr> <td><br><br></td></tr></table>"
    var3="&nbsp;"
    var1right="<!--Middle ad type : tower_right --><table border='0' cellpadding='0' cellspacing='0'><tr><td align='center'><div align='center'><font face='Arial, Helvetica, Sans Serif' color='#999999' size='-2'>Advertisement</font></div><!-- ADXINFO classification='tower_right'--><IFRAME SRC='tower.gif' WIDTH=170 HEIGHT=820 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'><scri + pt language='JavaScript1.1' SRC='tower.gif'><\/SCRIPT><NOSCRIPT><A HREF='http://ad.doubleclick.net/jump/N1974.nytimes/B1028662.6;abr=!ie4;abr=!ie5;sz=160x800;ord=2002.08.13.14.32.32?'><IMG SRC='tower.gif' BORDER=0 WIDTH=160 HEIGHT=800 ALT='Alt Text'></A></NOSCRIPT></IFRAME><br clear='all'></td><td rowspan='4' width='15' align='left'><img src='http://graphics.nytimes.com/images/misc/spacer.gif' width='15' height='1' border='0'/></td></tr> <tr> <td><br><br></td></tr></table>"
    var2right="<!--Middle ad type : tower_right --><table border='0' cellpadding='0' cellspacing='0'><tr><td align='center'><div align='center'><font face='Arial, Helvetica, Sans Serif' color='#999999' size='-2'>Advertisement</font></div><!-- ADXINFO classification='tower_right'--><IFRAME SRC='tower.gif' WIDTH=170 HEIGHT=820 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'><scri + pt language='JavaScript1.1' SRC='tower.gif'><\/SCRIPT><NOSCRIPT><A HREF='http://ad.doubleclick.net/jump/N1974.nytimes/B1028662.6;abr=!ie4;abr=!ie5;sz=160x800;ord=2002.08.13.14.32.32?'><IMG SRC='tower.gif' BORDER=0 WIDTH=160 HEIGHT=800 ALT='Alt Text'></A></NOSCRIPT></IFRAME><br clear='all'></td><td rowspan='4' width='15' align='left'><img src='http://graphics.nytimes.com/images/misc/spacer.gif' width='15' height='1' border='0'/></td></tr> <tr> <td><br><br></td></tr></table>"

    now=new Date()
    num=(now.getSeconds() )%4
    num2=(now.getSeconds() )%2


    if (num == 0)
    {advert=var0}
    if (num == 1)
    {advert=var1}
    if (num == 2)
    {advert=var2}
    if (num == 3)
    {advert=var3}
    if (num2 == 0 && num == 3)
    {advert2=var1right}
    if (num2 == 1 && num == 3)
    {advert2=var2right}
    </script>
    </head>

    <body>
    <table><tr><td valign="top">
    <div>September 11 renewed the modernist conviction that we live in an uncertain world of fragments. The skyline was shattered; a hole replaced a whole. Other comings-apart have further enhanced our sensation of the fragmentary. The grand design of globalization seems to have splintered, with the world once more becoming a puzzle of ill-fitting parts. Confidence in economic well-being has cracked along with the market. Respect for public figures has fallen, with CEOs, priests, and politicians transformed into so many Humpty-Dumpties who sat on the wall. Against such a backdrop, many public events -- including art exhibitions -- take on an unexpectedly symbolic cast.</div><p>

    <div>MoMA QNS, for example, is today a fragment of the Museum of Modern Art -- a disorienting but intriguing remnant of its earlier self. Traditionally, the museum, located in the heart of the prototypical modern city, has presented an imposing front to the world. Its perspective has been one of confident wholeness, as if MoMA alone could give full form to the varied and expansive story of modern art. There is little of that spirit in the former factory across the river where MoMA has taken temporary root. The museum lies in a part of Queens that seems to have no nucleus. The building itself, despite its renovation, is rather ordinary and lacks focus. The exhibits have an indistinct air. There is a show called "Tempo," a miscellany of contemporary works that address the theme of time. (Does anyone now know what time it is?) There are several beautifully designed automobiles on display in what resembles a showroom. (Does anyone have the keys?) There are photographs that Rudy Burckhardt took in Queens in the early forties that depict a peculiar, half-built city filled with gaps and rubble. (Does anyone know where the there is?) </div><p>
    <SCRIPT LANGUAGE="JavaScript">
    document.write(advert)
    </SCRIPT>

    <div>Even the permanent collection appears impermanent. It opens not with a grand statement but with a playful surrealist sculpture by Miró, Moonbird, that makes a virtue of whimsical shapelessness. In the actual presentation, there is a casual air. Nothing seems monumental. There is no powerful story line, no isolation of masterpieces. Some of the greatest works of modernism in the museum's collection, such as Picasso's Les Demoiselles d'Avignon, appear almost stolen -- that is, removed from their usual context and placed in a more slapdash environment. Who would have imagined that Picasso's prostitutes would one day end up on a street corner in Queens? Because of the open, free-flowing rooms and the lack of exhibition space, moreover, the art of the twentieth century appears compressed, with works from different eras and styles grouped closer together than would ordinarily be the case. Instead of a great narrative, there are playful strands of thought and unexpected links. A Richard Serra is not too far away from a Constantin Brancusi. A Matisse cutout faces a Pollock drip painting. The hope is to create passing sparks. Few would want the permanent collection to remain in this state forever, but the betwixt-and-between spirit of MoMA QNS is actually provocative -- and probably a useful tonic for the institution. There is always a danger that MoMA will become staid and nannylike, forgetting that modernism itself was typically anything but reverential and pedantic. MoMA as it ages should retain a capacity for play. It should sometimes celebrate movement, the partial, and abrupt shifts of context. </div><p>
    </td>
    <td valign="top">
    <SCRIPT LANGUAGE="JavaScript">
    document.write(advert2)
    </SCRIPT>
    </td>
    </tr>
    </table>
    </body>
    </html>
  2. #2
  3. No Profile Picture
    Moderator =(8^(|)
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2002
    Location
    Sacramento, CA
    Posts
    1,710
    Rep Power
    14
    Ugg, that's a mess to read. What is it supposed to be doing, and what is it not doing? Can't really help without knowing that

IMN logo majestic logo threadwatch logo seochat tools logo