/    Sign up×
Community /Pin to ProfileBookmark

Hello
How can I print the whole page of the web page except the command button ???

<HTML>
<BODY>
<FORM ACTION=”validate.asp” METHOD=”POST”>
Your Name: <INPUT TYPE=”Text” NAME=”name”><BR>
Your Email: <INPUT TYPE=”Text” NAME=”email”><BR>
Your ASP skills are:
<SELECT NAME=”skills” SIZE=”1″>
<OPTION VALUE=”Worst”>worst</OPTION>
<OPTION VALUE=”Pretty bad”>Pretty bad</OPTION>
<OPTION VALUE=”Bad”>Bad</OPTION>
<OPTION VALUE=”Good”>Good</OPTION>
<OPTION VALUE=”Excelent”>Excelent</OPTION>
</SELECT>

<INPUT TYPE=”Submit” VALUE=”Submit”>
<input type=”button” value=”print” onclick=”print()” />
</FORM>
</BODY>
</HTML>

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@CharlesMar 30.2005 — 1 You use CSS to set its "display" property to "none" but only for print.

2 Those trailling slashes, [font=monospace]<input type="button" value="print" onclick="print()" [b]/[/b]>[/font], ar a part of XHTML and have no place in HTML. On the other hand, XHTML requires lowercase element and tag names in your tags. But stick to HTML.

3 Your HTML needs help. Start with http://validator.w3.org .
Copy linkTweet thisAlerts:
@chicken_kingauthorMar 30.2005 — thanks for your help I will try it
Copy linkTweet thisAlerts:
@Warren86Mar 30.2005 — IDs assigned to the Submit and Print buttons...

<HTML>

<Head>

<Style type='text/css' media='print'>

#submitBtn {display : none}

#printBtn {display : none}


</Style>

</Head>

<BODY>

<FORM ACTION="validate.asp" METHOD="POST">

Your Name: <INPUT TYPE="Text" NAME="name"><BR>

Your Email: <INPUT TYPE="Text" NAME="email"><BR>

Your ASP skills are:

<SELECT NAME="skills" SIZE="1">

<OPTION VALUE="Worst">worst</OPTION>

<OPTION VALUE="Pretty bad">Pretty bad</OPTION>

<OPTION VALUE="Bad">Bad</OPTION>

<OPTION VALUE="Good">Good</OPTION>

<OPTION VALUE="Excelent">Excelent</OPTION>

</SELECT>

<INPUT TYPE="Submit" VALUE="Submit" id='submitBtn'>

<input type="button" value="print" onclick="print()" id='printBtn'>

</FORM>

</BODY>

</HTML>
Copy linkTweet thisAlerts:
@chicken_kingauthorMar 31.2005 — thanks a lot

it really works
Copy linkTweet thisAlerts:
@Warren86Mar 31.2005 — You're welcome. Take care.
×

Success!

Help @chicken_king spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...