| | |
print selected text in a html page
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2008
Posts: 6
Reputation:
Solved Threads: 0
Hi; how can a predefined text be printed in a html page? it means, when the "print this page" button/link is clicked all the elements in the window is printed even the button.
now is there any way to print just the texts & etc. without printing the buttons and unuseful elemets?
appreciating your replies.
now is there any way to print just the texts & etc. without printing the buttons and unuseful elemets?
appreciating your replies.
What you will need is a separate stylesheet for your printing layout.
To insert it, put this into your head:
then in the stylesheet simply put:
Done.
To insert it, put this into your head:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />
display:none; for each of the elements that you don't want to display.Done.
Hi! My name is Kirill Galenko. I am a freelance web designer. I am currently spending a lot of time working on the devesto project.
I live in London(UK) and am currently available for hire.
I live in London(UK) and am currently available for hire.
•
•
Join Date: Dec 2008
Posts: 6
Reputation:
Solved Threads: 0
•
•
•
•
What you will need is a separate stylesheet for your printing layout.
To insert it, put this into your head:
then in the stylesheet simply put:JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<link rel="stylesheet" type="text/css" href="/css/print.css" media="print" />display:none;for each of the elements that you don't want to display.
Done.
thank you, that's exactly what i was looking for!
regards
![]() |
Similar Threads
- pass the value to the text box (JavaScript / DHTML / AJAX)
- new to javascript (JSP)
- Selectively Printing only Certain Divs (javascript/css question) (JavaScript / DHTML / AJAX)
- modify script (Perl)
- inserting a size (PHP)
- php script (PHP)
- script problem adding to database (PHP)
- Documents (Java)
- Populating a fields on a form base on a selected item from a droplist. (PHP)
- adware.mainsearch - how do you get rid of it? (Viruses, Spyware and other Nasties)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Vertical Scrolling Gallery?
- Next Thread: Javascript checkbox validation
Views: 1665 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxhelp animate api automatically beta boarder box bug button calendar card checkbox child class column cookies createrange() css cursor disablefirebug dom download dropdown editor element engine error events explorer ext file firehose flash form forms google gwt html htmlform ie8 iframe image() images internet java javascript jawascriptruntimeerror jquery jsf jsfile jump margin math matrixcaptcha microsoft mimic mp3 mysql object offline onmouseoutdivproblem onreadystatechange parent passing pdf php player post problem progressbar rated rating regex runtime scroll search select session shopping size sql star stars stretch text textarea twitter validation w3c web website window windowofwords windowsxp wysiwyg xml xspf \n





