KeithMcElroy
asked on
populate a pop up div from the opener
I have not been able to get the h variable to be populated into the div tag on the pop up
/*
print-functions.js
WORK LOG
Date Name Item(s) Comments
8/22/2012 keith code review WARN: needs refinement,
*/
function closePrint()
{
$('#print-region').hide()
$('#print-region').html("" )
}
function printVersion()
{
h = $('#sectionA').html()
h += $('#sectionB').html()
h += $('#sectionC').html()
h += $('#sectionD').html()
h += $('#sectionE').html()
h += $('#sectionF').html()
h += $('#sectionG').html()
h += $('#sectionH').html()
h += $('#sectionI').html()
h += $('#sectionJ').html()
var popup = window.open( "HRPANFRM/popup/print.html ", "", "status = 1, width=400,height=200,toolb ar=yes, location=yes,directories=y es,status= yes,menuba r=yes,scro llbars=yes ,copyhisto ry=yes, resizable=yes" )
//populate h into the printarea div in the popup
}
//:popup file print.html
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></s cript>
<script src="../jq/print-element.j s" type="text/javascript"></s cript> <!--jquery library-->
<SCRIPT LANGUAGE=javascript>
<!--
function printthis()
{
$('#printarea').printEleme nt()
}
//-->
</SCRIPT>
</head>
<body>
<div id="printarea">
print area
</div>
<a href='javascript:printthis ()'>Print< /a>
</body>
</html>
/*
print-functions.js
WORK LOG
Date Name Item(s) Comments
8/22/2012 keith code review WARN: needs refinement,
*/
function closePrint()
{
$('#print-region').hide()
$('#print-region').html(""
}
function printVersion()
{
h = $('#sectionA').html()
h += $('#sectionB').html()
h += $('#sectionC').html()
h += $('#sectionD').html()
h += $('#sectionE').html()
h += $('#sectionF').html()
h += $('#sectionG').html()
h += $('#sectionH').html()
h += $('#sectionI').html()
h += $('#sectionJ').html()
var popup = window.open( "HRPANFRM/popup/print.html
//populate h into the printarea div in the popup
}
//:popup file print.html
<html>
<head>
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></s
<script src="../jq/print-element.j
<SCRIPT LANGUAGE=javascript>
<!--
function printthis()
{
$('#printarea').printEleme
}
//-->
</SCRIPT>
</head>
<body>
<div id="printarea">
print area
</div>
<a href='javascript:printthis
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window