Click here to Skip to main content
15,905,028 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
<div id="printContent">
<javascript>
GetInfo(@varA,@varB)
</javascritpt>
</div>
<button önClick="print()">Print</button>

When click on Print button wll pop up new windows to print the div printContent, somehow will hit javascript GetInfo() is undefined.

May i know how to pass the javascript value from html to pop up windows?
Posted

1 solution

Yes, you did not define a function called GetInfo. Where? Define it first.

—SA
 
Share this answer
 
Comments
LCT KKL 26-Feb-14 3:01am    
hi, Thanks for response! The GetInfo is defined somewhere just i didn't displayed here. GetInfo() is just an example. The problem I facing now is when I clicked print, the GetInfo seems not working but working fine in current page
Sergey Alexandrovich Kryukov 26-Feb-14 9:41am    
"Somewhere" means nothing. It is absent in some context, period. You did not show the definition, your error message says it is undefined.

The only problem is: why did you ask your question at all then? :-)

—SA

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