TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sriram Ramachandran
NA
6
2.4k
How to work with print option in javascript
May 30 2014 6:26 AM
Couldn't get the value using javascript...prtMenu got the value ... but at print window its showing undefined(alert('prtMenu') is working fine displaying the value)... What would be the error??
<script type="text/javascript">
function PrintGridData() {
var prtGrid = document.getElementById('<%=searchedgrid.ClientID %>');
var prtMenu = document.getElementById("<%=lblCurrentPath.ClientID %>").innerHTML;
var prtwin = window.open('', 'PrintGridView', 'left=100,top=100,width=400,height=400,tollbar=0,scrollbars=1,status=0,resizable=1');
if (prtMenu != null) {
prtwin.document.write(prtMenu.outerHTML);
}
if (prtGrid != null) {
prtwin.document.write(prtGrid.outerHTML);
}
prtwin.document.close();
prtwin.focus();
prtwin.print();
prtwin.close();
}
</script>
Reply
Answers (
2
)
plumbing issues differences in c# and javances
How to filter a table two times in mvc View