Onbekend |
|
Ik heb een eenvoudige functie geschreven:
function OpenFoto(sBestand, sTitel)
{
sVenster = '<?xml version="1.0"?>';
sVenster += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
sVenster += '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">';
sVenster += '<head>';
sVenster += '<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />';
sVenster += '<title>'+sTitel+'</title>';
sVenster += '<body style="margin: 0; padding: 0;">';
sVenster += '<a href="#" onclick = "javascript:window.opener=null;window.close();"><img style="border: 0;" src="'+sBestand+'" alt="'+sTitel+'" /></a>';
sVenster += '</body>';
sVenster += '</html>';
var sFotoVenster = window.open('', '', 'width=600,height=396,status=no,toolbar=no,resize=no,scrolling=no,border=no' );
sFotoVenster.document.write(sVenster);
}
function OpenFoto(sBestand, sTitel) { sVenster = '<?xml version="1.0"?>'; sVenster += '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'; sVenster += '<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">'; sVenster += '<head>'; sVenster += '<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />'; sVenster += '<title>'+sTitel+'</title>'; sVenster += '<body style="margin: 0; padding: 0;">'; sVenster += '<a href="#" onclick = "javascript:window.opener=null;window.close();"><img style="border: 0;" src="'+sBestand+'" alt="'+sTitel+'" /></a>'; sVenster += '</body>'; sVenster += '</html>'; var sFotoVenster = window.open('', '', 'width=600,height=396,status=no,toolbar=no,resize=no,scrolling=no,border=no' ); sFotoVenster.document.write(sVenster); }
Dit gaat prima in IE en Firefox, maar het vreemde is dat de popup in Firefox blijft laden ....
Wat doe ik fout?
|