Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 19-11-2008
Member
 
Join Date: Aug 2006
Posts: 287
Print with a popup

Hello friends, If I have this code:

HTML:
Quote:
<html>
<head> <head>
<script language= "JavaScript" > <script language= "JavaScript">
function imprimir(id) print function (id)
{ (
var envio = "imprimir.htm" + "?parte=" + id; var shipping = "imprimir.htm" + "? part =" + id;
var ventana = window.open(envio,"_blank","left=0,top=0,width=300 ,height=300,toolbar=no,location=no,status=no,menub ar=no,resizable=no,scrollbars=1"); var window = window.open (shipping, "_blank", "left = 0, top = 0, width = 300 height = 300, toolbar = no, location = no, status = no, menubar = no, resizable = no, scrollbars = 1 ");
} )
</script> </ script>
</head> </ head>
<body> <body>
<div class= "contenido" > <div class= "contenido">
<div class= "menu" > <div class= "menu">
<a href= "javascript <a href = "javascript :imprimir('print')" > Imprimir </a> : print ( 'print') "> Print </ a>
</div> </ div>
<div id= "print" > <div id= "print">
<span> DIV A IMPRIMIR </span> <br> <span> DIV A PRINT </ span> <br>
<span> DIV A IMPRIMIR </span> <br> <span> DIV A PRINT </ span> <br>
<span> DIV A IMPRIMIR </span> <br> <span> DIV A PRINT </ span> <br>
</div> </ div>
</div> </ div>
</body> </ body>
</html> </ html>
and imprimir.htm I have on my page:

Quote:
<% @ LANGUAGE = "JAVASCRIPT"%>
<html> <html>
<head> <head>
</head> </ head>
<body> <body>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</body> </ body>
</html> </ html>
I like to take that from me imprimir.htm only DIV I want to print?

I know that this can be done easier, such as doing everything in the same print function, but other issues I need to pass the DIV to print another page, and from another page to retrieve the party that has the id PRINT .

I understand it ?

Well, thanks in advance for any help.
__________________
Dimension 1100 (FMY032J) mini-tower
2.53ghz Intel Pentium 4
80 gig nfts HDD
512 RAM
Main circuit board: Dell 0CF458
BIOS: Dell A00
Display: Intel(R) 82865G Graphics Controller [Display adaptor]
Multimedia: Sound MAX Integrated Digital Audio
Windows XP Home SP2
Reply With Quote
  #2  
Old 19-11-2008
Member
 
Join Date: Nov 2005
Posts: 1,323
Re: Print with a popup

With window.opener.document accessing the elements of the window that opened the popup, you can obtain data from a div with, for example, window.opener.document.getElementById ( "iddiv"). ErHTML inn and place it where you want to the popup.
Reply With Quote
  #3  
Old 19-11-2008
Member
 
Join Date: Aug 2006
Posts: 287
Re: Print with a popup

Thanks, but that is when the popup that I am going to open a html?, That is what I mean is that the popup will have a page loaded, then from that popup, as the recovery of DIV another page?

The same question demand in the example, can be done? Sorry but if the answer was no before you can understand.
__________________
Dimension 1100 (FMY032J) mini-tower
2.53ghz Intel Pentium 4
80 gig nfts HDD
512 RAM
Main circuit board: Dell 0CF458
BIOS: Dell A00
Display: Intel(R) 82865G Graphics Controller [Display adaptor]
Multimedia: Sound MAX Integrated Digital Audio
Windows XP Home SP2
Reply With Quote
  #4  
Old 19-11-2008
Member
 
Join Date: Nov 2005
Posts: 1,323
Re: Print with a popup

Yes, it is possible, even if the popup has a page loaded, you can recover within a div or other item which is in the window that opened (window.opener.document).
Reply With Quote
  #5  
Old 19-11-2008
Member
 
Join Date: Aug 2006
Posts: 287
Re: Print with a popup

Thanks absolute55, It worked perfectly, I never knew this could be done without the use for nothing or database programming. Thank you very much.
__________________
Dimension 1100 (FMY032J) mini-tower
2.53ghz Intel Pentium 4
80 gig nfts HDD
512 RAM
Main circuit board: Dell 0CF458
BIOS: Dell A00
Display: Intel(R) 82865G Graphics Controller [Display adaptor]
Multimedia: Sound MAX Integrated Digital Audio
Windows XP Home SP2
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Print with a popup"
Thread Thread Starter Forum Replies Last Post
Why does popup blocker in windows 7 not stop netflix popup ads? Braasch Operating Systems 6 11-08-2010 12:33 PM
Using current XP Print drivers and Windows 7 Print drivers on 2003 Print Server Richcom Operating Systems 3 28-07-2010 10:19 PM
Unable to Print or Print Preview from IE7 on Vista Home Premium Poppy Vista Help 8 09-11-2009 07:14 AM
How to cancel printing or to delete a print job that is stuck in the print queue in Windows XP Alan Morris [MSFT] Windows XP Support 6 30-05-2008 10:53 PM
Print spooler hangs when trying to print from a shared print Jisbomb Windows XP Support 3 27-07-2007 10:17 PM


All times are GMT +5.5. The time now is 05:06 AM.