Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Print a the data on a specific frame only?

    hi

    This is my code
    Code:
    INDEX.HTML
    
    
    <FRAMESET rows="145,*"  border=0 frameborder="0">
     
       
                   
                   <frame name="Top" src="top.htm" scrolling="no" >
                    
          <FRAMESET cols="150,*"  border=0 frameborder="0">
                   <frame name="left" src="left.html" scrolling="no">
                   <FRAMESET rows="*,20"  border=0 frameborder="0">
                          <frame name="display" src="display.html" scrolling="yes">
                          <frame name="down" src="down.html" scrolling="no">
    
    
    
    </frameset>
    </frameset>
    </frameset>
    </frameset>
    i want to put a print button on display.html page
    and i want when i click on it , to print only the display.html page
    without printing the other frames
    (of course i will click on it when am on the index.html)

    so anybody have any idea about this move??

  • #2
    Regular Coder
    Join Date
    Jan 2004
    Location
    Port Huron, MI, U.S.A.
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts
    window.document.print()
    OR
    window.print(document)
    Oh, was I supposed to put something here? ........

  • #3
    New to the CF scene
    Join Date
    Dec 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    .

    Thanx a lot

    but i also find a Continue to yr code ,

    i will put it here ,so if anybody want to benefit from it

    Code:
    <head>
    
    <SCRIPT LANGUAGE="JavaScript">
    function myprint() {
    window.parent.display.focus();
    window.print();
    }
    </script>
    
    </head>
    
    <body>
    
    <input type=image src='printer.jpg'  onClick="myprint()">
    
    </body>
    if u want to use it u have to change window.parent.display.focus(); to the your frame page name , u want to print it

    and also , if u dont have an img called printer.jpg

    u can make it as a button

    <input type=button value="Click To Print" src='printer.jpg' onClick="myprint()">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •