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
Reply

Join Date: Dec 2004
Posts: 38
Reputation: mindfrost82 is an unknown quantity at this point 
Solved Threads: 0
mindfrost82 mindfrost82 is offline Offline
Light Poster

Stop printing boxes around forms?

 
0
  #1
Jan 30th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1,091
Reputation: MattEvans is a jewel in the rough MattEvans is a jewel in the rough MattEvans is a jewel in the rough 
Solved Threads: 63
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Veteran Poster

Re: Stop printing boxes around forms?

 
0
  #2
Jan 30th, 2007
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:

JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. <input type="text" style="border-style:none;"/>
  2. and for textareas:
  3. <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)
  1. input{
  2. border-style:none;
  3. }
  4.  
  5. textarea{
  6. border-style:none;
  7. }

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)
  1. <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..
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC