Permalänk

window.open()

detta scriptet finner jag inge fel i... men det vägrar funka!!!

<SCRIPT LANGUAGE="javascript">
<!--
function win(url,height,width)
{
unik=new Date();
unik=unik.getSeconds()+"_"+unik.getMinutes()+"_"+unik.getHours();
tools="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no";
tools+=",width="+width;
tools+=",height="+height;

new_win = window.open("",unik,tools);
new_win.document.open();
new_win.document.write("<BODY TOPMARGIN='0' LEFTMARGIN='0'>");
new_win.document.write("<img src="url">"); // url är en variabel.. vete fan om den är rätt heller...
new_win.document.write("</BODY>");
}
//-->
</SCRIPT>

Visa signatur

Josef was here | http://www.jdsight.net

Permalänk
Medlem

JavaScript har ingen variabelparsing i strängar, så

new_win.document.write("<img src="url">");

måste skrivas

new_win.document.write("<img src='"+url+"'>");

Du har en radbrytning här, eller blev det bara så när du skrev inlägget:

tools=" toolbar=no,location=no,directories=no,status=no,menubar=no,s crollbars=no,resizable=no";

Hur som helst får där inte vara någon radbrytning.

Du kan plocka bort raden med new_win.document.open();.