member Posted September 18, 2006 Share Posted September 18, 2006 Hi, I am wondering if anyone can give me or knows a code which prints a certain part of a webpage either a PHP include bit or a certain part of a webpage. Is there a way, if so please let me know. The print button will be an image not a standard button (form).Also, "Print Window" method won't work, because it will print the entire site. Thank You .Your help is most appreciated Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/ Share on other sites More sharing options...
craygo Posted September 18, 2006 Share Posted September 18, 2006 You can use an activex program called scriptx. It is free and you can tell your web page what to print and what not to just by putting it in a certain class or between <div> tags. I use it to print up mysql web reports so there is nothing on the page BUT the report.http://www.meadroid.com/scriptx/freedep.aspRay Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94091 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 Thanks, but the url don't work, tried another site: http://www.jibbering.com/accessibility/install-scriptx.htmlInstalled it, but all it says is "Scriptx 5.5 was successfully installed" and it is not on my program files or anything?Where is it?, is it installed as part of a programme?oh no it works!!thanks Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94092 Share on other sites More sharing options...
AndyB Posted September 18, 2006 Share Posted September 18, 2006 It makes the most sense (to me) to have two separate stylesheets - one for media=screen, one for media=print. The print CSS stylesheet simply uses 'display:none' for everything on your html page that you do not want sent to the printer. That gives you printer-friendly pages with nothing more than one extra CSS file and uses the javascript window.print methodNeed an example? Look at www.digitalmidget.com/php_noob/comment.php and use the 'file>print preview' option in your browser to see what would be printed from any page (or go ahead and hit the 'print page' image/link) on that page. Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94095 Share on other sites More sharing options...
craygo Posted September 18, 2006 Share Posted September 18, 2006 Url works fine for me. That is the description of the program, you need to go to downloads on the left to get the programhttp://www.meadroid.com/scriptx/sxdownload.asp Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94097 Share on other sites More sharing options...
craygo Posted September 18, 2006 Share Posted September 18, 2006 Problem I have always have is the page numbers show up on top and the site shows on the bottom when you print. I know the CLIENT can shut them off, but why make them do it. The scriptx app shuts them down automatically. I have had good luck with it but I am sure there are alot of different ways to do it.Ray Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94098 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 I downloaded, And havn't got a clue how to use this, i'm new to php. It only appears on my start menu Under "Mead & Company" >> "Licencse Manager" <<<<<<<<<<<<<That's it, it's only a license stuff.any idea? Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94101 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 oh yeh Thanks AndyB!! u helped me a lot, for that random .txt loader thing, I appreciate that, hought i'd tell u while ur here.U can see a test on: http://islamcentre.awardspace.com/test/test2.php (just a test, one file missing).anyways wheres that craygo gone.... Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94105 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 Or i got another idea. What about it opens a new window a printer friendlier version with only that part in it.But problem is, is that it is a random text loader, just the same as the url as above that i gave to andyb. So it will change the text. Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94106 Share on other sites More sharing options...
craygo Posted September 18, 2006 Share Posted September 18, 2006 You can do that but you will get all the other crap on the top and bottom of the pageRayI am giving you a tutorial now one sec Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94111 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 ok thanks, tutorial will be helpful a lot, i newbie as i told u before, so it will take a lot of telling to get it throught my head.an example could be on: http://www.fisabilillah.org/ scroll down and u should see a "HAdith" it has a green print button, don't mind something like that, but i think it will require me to give them an id for each quote, which won't help because there are thousands of quotes. Thanks again... Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94114 Share on other sites More sharing options...
craygo Posted September 18, 2006 Share Posted September 18, 2006 OK this forum will not let me post the code I keep getting an error!!! Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94116 Share on other sites More sharing options...
craygo Posted September 18, 2006 Share Posted September 18, 2006 sent e-mail Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94122 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 keep checking ur inbox, refresh it , every mome Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94123 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 i'm back u there? Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94172 Share on other sites More sharing options...
member Posted September 18, 2006 Author Share Posted September 18, 2006 Craygo, lost internet connection, can u come back pls?[quote author=craygo link=topic=108519.msg436688#msg436688 date=1158603808]sent e-mail[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-94220 Share on other sites More sharing options...
member Posted October 22, 2006 Author Share Posted October 22, 2006 is there another way, such as using tags?like this------------------------------------------------other content<print this bit>to be printed part</print this bit>other stuff on site------------------------------------------------thanks Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-112648 Share on other sites More sharing options...
AndyB Posted October 22, 2006 Share Posted October 22, 2006 [quote author=member link=topic=108519.msg455796#msg455796 date=1161519675]is there another way, such as using tags?like this------------------------------------------------other content<print this bit>to be printed part</print this bit>other stuff on site------------------------------------------------thanks[/quote][b]YES![/b], and very, very, simply. Use CSS to define what is shown when a page is seen on screen and what is seen when the page is printed. Reply #3 in this thread explains. Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-112649 Share on other sites More sharing options...
member Posted September 23, 2007 Author Share Posted September 23, 2007 Hi AndyB , could you please explain to me and show me how to do this? Long time since last post.Thanks Quote Link to comment https://forums.phpfreaks.com/topic/21170-php-include-print-only-may-need-javascript/#findComment-353483 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.