printing the webpage

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric

    #1

    printing the webpage

    There is a HTML page which composes several frames. Each frame displays
    a different HTML page.

    When "windows.print( )" is invoked in a particular HTML frame page, a
    print dialog pop-ups but it can print the contents in that particular
    HTML frame page only. This is different from by selecting "File->Print
    ...." from Internet Explorer.

    May I know how to pop-up a print dialog invoked by JavaScript in a
    particular frame which can print all contents of the whole HTML page
    (including the contents of the frames) but not only the contents of
    that particular frame?

    Thank you.

  • theintrepidfox@hotmail.com

    #2
    Re: printing the webpage

    Hi!

    Have you tried this inside the javascript that invokes the print?

    // Give focus to parent frame
    MyParentFrame.f ocus()
    // Print parent frame. That should print everything
    MyParentFrame.p rint()

    You may can store the name of the frame that invoked the print in a
    variable and then return the focus to that frame after the onafterprint
    event in case you need to have focus back on that frame.

    HTH, M

    Comment

    • theintrepidfox@hotmail.com

      #3
      Re: printing the webpage

      Hi!

      Have you tried this inside the javascript that invokes the print?

      // Give focus to parent frame
      MyParentFrame.f ocus()
      // Print parent frame. That should print everything
      MyParentFrame.p rint()

      You may can store the name of the frame that invoked the print in a
      variable and then return the focus to that frame after the onafterprint
      event in case you need to have focus back on that frame.

      HTH, M

      Comment

      • theintrepidfox@hotmail.com

        #4
        Re: printing the webpage

        Hi!

        Have you tried this inside the javascript that invokes the print?

        // Give focus to parent frame
        MyParentFrame.f ocus()
        // Print parent frame. That should print everything
        MyParentFrame.p rint()

        You may can store the name of the frame that invoked the print in a
        variable and then return the focus to that frame after the onafterprint
        event in case you need to have focus back on that frame.

        HTH, M

        Comment

        • theintrepidfox@hotmail.com

          #5
          Re: printing the webpage

          Hi!

          Have you tried this inside the javascript that invokes the print?

          // Give focus to parent frame
          MyParentFrame.f ocus()
          // Print parent frame. That should print everything
          MyParentFrame.p rint()

          You may can store the name of the frame that invoked the print in a
          variable and then return the focus to that frame after the onafterprint
          event in case you need to have focus back on that frame.

          HTH, M

          Comment

          • Randy Webb

            #6
            Re: printing the webpage

            theintrepidfox@ hotmail.com wrote:
            [color=blue]
            > Hi!
            >
            > Have you tried this inside the javascript that invokes the print?[/color]

            You can try it but it won't be very dependable.
            [color=blue]
            > // Give focus to parent frame
            > MyParentFrame.f ocus()[/color]

            MyParentFrame is undefined.
            [color=blue]
            > // Print parent frame. That should print everything
            > MyParentFrame.p rint()[/color]

            MyParentFrame is undefined.
            [color=blue]
            > You may can store the name of the frame that invoked the print in a
            > variable and then return the focus to that frame after the onafterprint
            > event in case you need to have focus back on that frame.[/color]

            My browser has no onafterprint event. But, you don't need to wait, you
            can set focus back to your window.
            [color=blue]
            > HTH, M[/color]

            It didn't, it only confused the issue. In the future, before you post
            the same thing 4 times without quoting what you are replying to, please
            read this groups FAQ, its linked to in my signature.

            --
            Randy
            comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

            Comment

            • theintrepidfox@hotmail.com

              #7
              Re: printing the webpage

              Before you have a go at me speak to Google. It's a refresh problem that
              caused a blank reply to repost before I noticed. And get a proper
              browser that supports the onafterprinteve nt too.

              Comment

              • Randy Webb

                #8
                Re: printing the webpage

                theintrepidfox@ hotmail.com wrote:[color=blue]
                > Before you have a go at me speak to Google. It's a refresh problem that
                > caused a blank reply to repost before I noticed. And get a proper
                > browser that supports the onafterprinteve nt too.
                >[/color]

                I would explain that to you but you are obviously either too anal or too
                stupid to understand the answer.

                --
                Randy
                comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly
                Answer:It destroys the order of the conversation
                Question: Why?
                Answer: Top-Posting.
                Question: Whats the most annoying thing on Usenet?

                Comment

                • theintrepidfox@hotmail.com

                  #9
                  Re: printing the webpage

                  What?

                  Comment

                  • Randy Webb

                    #10
                    Re: printing the webpage

                    theintrepidfox@ hotmail.com wrote:
                    [color=blue]
                    > What?
                    >[/color]

                    What What?
                    WTF are you talking about?

                    Read this groups FAQ. Very thoroughly.

                    Maybe after that you won't need to ask "What?" in reply to being called
                    anal, it will come to you.

                    --
                    Randy
                    comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

                    Comment

                    • theintrepidfox@hotmail.com

                      #11
                      Re: printing the webpage


                      I reported you to abuse for your inappropiate language.

                      Comment

                      • Randy Webb

                        #12
                        Re: printing the webpage

                        theintrepidfox@ hotmail.com wrote:[color=blue]
                        > I reported you to abuse for your inappropiate language.[/color]

                        Are you actually as stupid as you act? Don't answer that. It might cause
                        you to have brain farts trying to figure it out.

                        --
                        Randy
                        comp.lang.javas cript FAQ - http://jibbering.com/faq & newsgroup weekly

                        Comment

                        Working...