Ok, i got it working with this code:
Code:
var sHTML = '<style type="text/css">body{margin:0;height:100%;overflow-y:auto;padding: 0 16px 0 0;}#hockeystick{display:block;top:0px;left:0px;width:100%;heigth:100%;position:fixed;z-index: 9999;}* html #hockeystick{position:absolute;}</style><!--[if lte IE 6]><style type="text/css">/*<![CDATA[*/ html{overflow-x:auto; overflow-y:hidden;}/*]]>*/</style><![endif]--><!--[if lte IE 6]><style>/*<![CDATA[*/ #adsie{position:absolute; top:0px; left:0;}/*]]>*/</style><![endif]-->';
window.document.write(sHTML);
var sCreative='<div id="hockeystick"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="100%" height="100%"><param name="movie" value="http://www.dqatestsite.nl/test/hockeystick.swf" /><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="SCALE" value="exactfit" /><embed src="http://www.dqatestsite.nl/test/hockeystick.swf" width="100%" height="100%" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" scale="exactfit"></embed></object></div>';
//window.document.body.insertAdjacentHTML("beforeEnd",sCreative);
document.body.innerHTML = document.body.innerHTML + sCreative;
but this only works on pages with this doctype declaration:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
and the site where it has to placed has:
Code:
<?xml version="1.0"?>
or
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
or even both...
Does anyone know how to work around this???
Bookmarks