stop \n getting intercepted in a pop up

F

Fazal

Hi,

<html>
<script type="text/javascript">
win=window.open();
var printDoc=win.document.open('text/html','replace');
printDoc.writeln("\"\211PNG\r\n\032\n\"+this.png.join('');");
printDoc.close();
</script>
</html>

Can anyone correct error in this code. It displays a popup but with no
content.
 
S

Stephen Chalmers

Fazal said:
Hi,

<html>
<script type="text/javascript">
win=window.open();
var printDoc=win.document.open('text/html','replace');
printDoc.writeln("\"\211PNG\r\n\032\n\"+this.png.join('');");
printDoc.close();
</script>
</html>

Can anyone correct error in this code. It displays a popup but with no
content.

The JS console should have enlightened you...

var printDoc=win.document; //assuming win!=null
printDoc.open(...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top