Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 09-20-2005, 10:10 PM
  #1
Érico
Veteran (Level 7)
 
Join Date: Nov 2003
Posts: 68
iTrader: (0)
Érico is on a distinguished road
Printing another page

I need to make the browser print a page. The page that needs to be printed is just a image and I can't put code there. Is there a way I can open the printer dialog on this page by calling it in the form submit of the parent page?

This is the submit of the parent page:
<input type="submit" name="submit" value="Print" onClick="document.theform.action='http://url:9090/boleto';">

Need to fit this somehow:
<script language="JavaScript">window.print();</script>
Érico is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-20-2005, 10:32 PM
  #2
_Aerospace_Eng_
The CSS Master (somewhat)
 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a galaxy far far away...
Posts: 11,154
iTrader: (0)
_Aerospace_Eng_ has disabled reputation
If you don't have control over the page you need to print then there isn't really anything you can do. You will get an access denied error.
__________________

76 invites left. PM me for a Gmail invite along with email addy.
Why we won't help you .::. Web Developer's Handbook .::. Why Tables for Layout is Stupid?
_Aerospace_Eng_ is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-21-2005, 11:19 PM
  #3
Jon Hanlon
Super Guru (Moderator)
 
Jon Hanlon's Avatar
 
Join Date: Jul 2001
Location: Sydney, Australia
Posts: 1,842
iTrader: (0)
Jon Hanlon will become famous soon enough
There is no way to automatically instigate a print.
You can try a <link> tag in the <head>:
<link rel="alternate" media="print" href="greatBigPicture.gif" >
This causes the browser to print an alternate version of the current page.

http://www.dynamicdrive.com/dynamici...printstyle.htm
__________________
Jon Hanlon
Jon Hanlon is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-22-2005, 12:50 AM
  #4
maskd
Swordman (Level 9)
 
maskd's Avatar
 
Join Date: Sep 2005
Location: NSW, Australia
Posts: 88
iTrader: (0)
maskd is an unknown quantity at this point
Did you mean something like this?

Code:
<html>

<head>

<title>Print external page</title>

<script language="Javascript">

function printOther()
{
  frames['iframe'].print();
}

</script>
</head>
<body>
<input type="submit" value="Print" onClick="printOther();">
<hr>
<iframe src="{URL_TO_BE_PRINTED}" name="iframe">

</body>

</html>
Change {URL_TO_BE_PRINTED} with what page you want to be printed. I'm sure this could be edited to make it better with maybe a text box to input what url you want or something
maskd is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 02:45 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.