Click here to Skip to main content
15,886,066 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Iam using Html2Canvas.js for converting a div into canvas


JavaScript
var canvasimage=""; 
 html2canvas($("#dvorder"), {
                onrendered: function (canvas) {
                    theCanvas = canvas;
                    $('#imgDemo').append(canvas);
                    $('#imgDemo canvas').attr('id', 'Billcan');                   
                    canvasimage = document.getElementById('Billcan').toDataURL("image/png");                   
                  
                }
                
            });



How to get the value of variable canvasimage outside the html2Canvas
refer:http://jsfiddle.net/8ypxW/3/[^]
Posted
Updated 20-Oct-15 21:26pm
v4
Comments
Style-7 21-Oct-15 6:09am    
Why? Just put <canvas> tag into <div>
Richard Deeming 21-Oct-15 8:41am    
The JSFiddle doesn't match the code you've posted, and neither code block demonstrates the problem you're trying to solve.

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