I am not sure how an Iframe is going to be displayed within your html page using this code. I would place a js call inside a table, in any event, so that it has a place-holder in your html.pl code.
You should create a separate js file with the javascript.
Save the following code:
<!--
var id=743; var jar=new Date();var s=jar.getSeconds();var m=jar.getMinutes();
var flash=s*m+id;var cgi='http://www.sitename.com/cgi-bin/adcycle';
var p='<iframe src="'+cgi+'/adcycle.cgi?gid=21&t=_top&id='+flash+'&type=iframe" ';
p+='height=60 width=468 border=0 marginwidth=0 marginheight=0 hspace=0 ';
p+='vspace=0 frameborder=0 scrolling=no>';
p+='<a href="'+cgi+'/adclick.cgi?gid=21&id='+flash+'" target="_top">';
p+='<img src="'+cgi+'/adcycle.cgi?gid=21&id='+flash+'" width=468 height=60 ';
p+='border=1 alt="Click to Visit"></a></iframe>'; document.write(p); // -->
as, say "adcycle.js" and load it into your public html directory. Then, instead of the above code, simply put <Script Language="JavaScript" src="http://www.yourdomain.com/adcycle.js"></script> inside the table.
Perl can get confused when it comes across javascript within it, and can attempt to interpret it - with bad results!
I frequently use javascript withing dbman scripts, but always use this method.
Hope you can get it to work.
-------------
David Olley
Anglo & Foreign International Limited,
http://www.firehelmets.co.uk There are 10 types of people in the world: those who understand binary, and those who don't.