Click here to Skip to main content
15,897,371 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Need to print page contents of my web page.I call javascrip

Window.print();

function

which only print textbox values

i need to print label value as wel...

can any one help me please
Posted

It works fine for me:
HTML
<script language="JavaScript">
    if (window.print) {
        document.write('<form><input type=button name=print value="Print" onClick="window.print()"></form>');
    }
</script>
 
Share this answer
 
Comments
tkkf87 30-Jul-11 9:28am    
it does not print label values....and I am work with C#.Net not with html even if used java script.Itz only print textbox values
OriginalGriff 30-Jul-11 9:30am    
It does for me: how are you loading your labels?
tkkf87 30-Jul-11 9:37am    
m creating labels....accordig to database codinaes,id,name,style like wise,
i just try which has more than one text box,itz only print one text box value...Ohhh....OOP
OriginalGriff 30-Jul-11 9:42am    
"Ohhh....OOP" - does that mean you have spotted the problem? :laugh:
tkkf87 30-Jul-11 9:41am    
labels are placed by using placeholder

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900