stop \n getting intercepted in a pop up

Discussion in 'Javascript' started by Fazal, Nov 11, 2005.

  1. Fazal

    Fazal Guest

    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.
    Fazal, Nov 11, 2005
    #1
    1. Advertising

  2. Fazal wrote:
    > 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(...)

    --
    S.C.
    Stephen Chalmers, Nov 11, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    8,504
    Randy Webb
    Feb 4, 2006
  2. Guest

    Virus intercepted

    Guest, Sep 27, 2004, in forum: Python
    Replies:
    0
    Views:
    279
    Guest
    Sep 27, 2004
  3. Bone Ur
    Replies:
    4
    Views:
    373
    Bone Ur
    Dec 19, 2007
  4. Brian Candler

    RubyGarden wiki URLs being intercepted

    Brian Candler, Jul 20, 2005, in forum: Ruby
    Replies:
    1
    Views:
    121
    James Britt
    Jul 20, 2005
  5. John

    Module Tie::Handle::Intercepted

    John, May 6, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    128
Loading...

Share This Page