| | |
Stop printing boxes around forms?
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Dec 2004
Posts: 38
Reputation:
Solved Threads: 0
I have a form on my website that requires the user to enter data. They are all single line text boxes.
At the bottom of the form I have two buttons, one for Print and one for Submit. The Print button just opens the print dialog box and allows them to print the current page (including the form that was filled out). The Submit button just brings them to a thank you page.
I have a couple questions. Using PHP, HTML, or a javascript...
Is there a way to make the boxes not print around the forms, for example, just have the text print without the box around it?
And also, when hitting the Print button, is there a way to make it hide both the Print and Submit buttons until the print dialog box is closed?
Thanks for you help.
At the bottom of the form I have two buttons, one for Print and one for Submit. The Print button just opens the print dialog box and allows them to print the current page (including the form that was filled out). The Submit button just brings them to a thank you page.
I have a couple questions. Using PHP, HTML, or a javascript...
Is there a way to make the boxes not print around the forms, for example, just have the text print without the box around it?
And also, when hitting the Print button, is there a way to make it hide both the Print and Submit buttons until the print dialog box is closed?
Thanks for you help.
I'm assume that you don't want border's around the inputs rather than around the form :- a form is a container for inputs, buttons etc; inputs are the individual 'fields' of a form.
Ok, to remove the border from an input; try this:
if you want to disable borders for all inputs and textareas, add this to any applied CSS block:
that won't remove the background color from the inputs mind, you'll have to make them the same color as the page background. I don't know if it's possible to make them transparent; perhaps it is.
To 'hide' a button is relatively easy; but getting it to come back again might be difficult...
Try:
like I say, getting it to come back at the right time might be hard...
Ok, to remove the border from an input; try this:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<input type="text" style="border-style:none;"/> and for textareas: <textarea style="border-style:none;"/>
if you want to disable borders for all inputs and textareas, add this to any applied CSS block:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
input{ border-style:none; } textarea{ border-style:none; }
that won't remove the background color from the inputs mind, you'll have to make them the same color as the page background. I don't know if it's possible to make them transparent; perhaps it is.
To 'hide' a button is relatively easy; but getting it to come back again might be difficult...
Try:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<input type="Submit" onclick="this.style.display = 'none';"/>
like I say, getting it to come back at the right time might be hard...
Plato forgot the nullahedron..
![]() |
Similar Threads
- Remove URL from Bottom of Printed Web Page (JavaScript / DHTML / AJAX)
- Flash Player stop working since Ad-aware (Web Browsers)
- Printing to a Textbox (C#)
- Want to learn LINUX..some help required (Getting Started and Choosing a Distro)
- Automatic Updates Error (Viruses, Spyware and other Nasties)
- Flash Player stop working and won't reinstall (Windows NT / 2000 / XP)
- print problem in restricted user account (Windows NT / 2000 / XP)
- Floating point numbers (C++)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Help with my Navigation bar
- Next Thread: Datatable and AJAX
| Thread Tools | Search this Thread |
acid2 ajax ajaxcode ajaxexample ajaxhelp animate array automatically beta box bug calendar cart checkbox class codes column cookies createrange() css cursor date debugger decimal design dom download dropdown editor element embed enter error explorer firefox focus frameworks getselection google gwt hint html htmlform ie7 iframe images index internet java javascript javascripthelp2020 jawascriptruntimeerror jquery jsf jsfile jsp jump listbox maps masterpage math menu microsoft mimic mp4 object onmouseover parent paypal php player position post problem programming progressbar prototype redirect regex runtime safari scale scriptlets search select session shopping size sql text textarea toggle variables w3c website window windowofwords windowsxp wysiwyg \n






