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

    Join Date
    Aug 2003
    Location
    Midwest USA
    Posts
    3
    Rep Power
    0

    Help on adding javascript to perl


    I am wanting to insert javascript into the perl code listed below. Basically wanting to take out the line: print "<a href='/cgi-bin/auction.pl?action=agree'><img src='/adv1.gif' border='0'></a>";

    and replace it with the javascript I have listed below. Maybe possible, maybe not. Any help appreciated.....

    print "</td>";
    print "<td width=10></td>";
    print "</tr>";
    print "</table></td>";
    print "</tr>";
    print "</table>";
    ####### Search Box End ##########
    print "</TR></TD>";
    print "<TR><TD>";
    print "<a href='/cgi-bin/auction.pl?action=agree'><img src='/adv1.gif' border='0'></a>";
    ####### Top Begin ##########
    print "<TABLE cellSpacing=0 width=100\% border=0>";
    print "<TBODY>";


    ---------------------------------------------------------------------
    Java script to insert:

    <!-- START ADCYCLE IFRAME RICH MEDIA CACHE-BUST CODE for Control Service -->
    <script language="javascript"><!--
    var id=778; var jar=new Date();var s=jar.getSeconds();var m=jar.getMinutes();
    var flash=s*m+id;var cgi='http://www.bidem.com/cgi-bin/adcycle';
    var p='<iframe src="'+cgi+'/adcycle.cgi?gid=3&t=_blank&id='+flash+'&type=iframe" ';
    p+='height=170 width=420 border=0 marginwidth=0 marginheight=0 hspace=0 ';
    p+='vspace=0 frameborder=0 scrolling=no>';
    p+='<a href="'+cgi+'/adclick.cgi?gid=3&id='+flash+'" target="_blank">';
    p+='<img src="'+cgi+'/adcycle.cgi?gid=3&id='+flash+'" width=420 height=170 ';
    p+='border=1 alt="Click to Visit"></a></iframe>'; document.write(p); // -->
    </script><noscript><a href="http://www.bidem.com/cgi-bin/adcycle/adclick.cgi?gid=3&id=778" target="_blank">
    <img src="http://www.bidem.com/cgi-bin/adcycle/adcycle.cgi?gid=3&id=778" width=420 height=170 border=1></a></noscript>
    <!-- END ADCYCLE IFRAME RICH MEDIA CODE -->
  2. #2
  3. 'fie' on me, allege-dly
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2003
    Location
    in da kitchen ...
    Posts
    12,894
    Rep Power
    6444
    Replace
    Code:
    print "<a href='/cgi-bin/auction.pl?action=agree'><img src='/adv1.gif' border='0'></a>";
    with
    Code:
    print <<"EOF";
    <!-- START ADCYCLE IFRAME RICH MEDIA CACHE-BUST CODE for Control Service --> 
    <script language="javascript"><!-- 
    var id=778; var jar=new Date();var s=jar.getSeconds();var m=jar.getMinutes(); 
    var flash=s*m+id;var cgi='http://www.bidem.com/cgi-bin/adcycle'; 
    var p='<iframe src="'+cgi+'/adcycle.cgi?gid=3&t=_blank&id='+flash+'&type=iframe" '; 
    p+='height=170 width=420 border=0 marginwidth=0 marginheight=0 hspace=0 '; 
    p+='vspace=0 frameborder=0 scrolling=no>'; 
    p+='<a href="'+cgi+'/adclick.cgi?gid=3&id='+flash+'" target="_blank">'; 
    p+='<img src="'+cgi+'/adcycle.cgi?gid=3&id='+flash+'" width=420 height=170 '; 
    p+='border=1 alt="Click to Visit"></a></iframe>'; document.write(p); // --> 
    </script><noscript><a href="http://www.bidem.com/cgi-bin/adcycle/adclick.cgi?gid=3&id=778" target="_blank"> 
    <img src="http://www.bidem.com/cgi-bin/adcycle/adcycle.cgi?gid=3&id=778" width=420 height=170 border=1></a></noscript> 
    <!-- END ADCYCLE IFRAME RICH MEDIA CODE -->
    EOF

    HTH
    --Ax
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Location
    Midwest USA
    Posts
    3
    Rep Power
    0

    Thanks


    Thanks a bunch for your help...I knew there had to be a simple solution, I just did know what the correct tags were...

    Thanks Again.

IMN logo majestic logo threadwatch logo seochat tools logo