Hi there,
The #DontPrint refers to the ID of an object on your page; not the name.
This should work:
Code:
<body>
<input type="button" name="PrintIt" value="Print This">
<p> </p>
<input type="button" id="DontPrint" name="DontPrint" value="Should Not Print">
</body>
A more reusable approach is to create a custom class:
Code:
<style type="text/css">
@media print { .DontPrint { display:none }}
</style>
Note that I changed the # to .
Now you can apply this class to multiple objects on the page:
Code:
<body>
<input type="button" name="PrintIt" value="Print This">
<p> </p>
<input type="button" class="DontPrint" name="DontPrint" value="Should Not Print">
<input type="button" class="DontPrint" name="DontPrint2" value="Doesn't Print Either">
</body>
HtH,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.