javascript - how to take a html webpage as a screenshot and send as a image to mail -
i want html webpage sent email screen shot when click confirm button, client can have total webpage image. new java script. tried in many ways not working me correctly. suggestion appreciable , helpful me, using below code.....
<div class="container" style="padding-top: 15px;"> <div id="site"> <form action="cart.php" method="post" id="" > <table><tr> <div id="content"> <td> <form action="" method="post" id="checkout-order-form" style="margin-top: 50px;"> <h2>confirm details</h2> <fieldset id="fieldset-shipping"> <div class="form-group col-md-6" style="padding-left: 15px;width:330px;"> <input type="text" name="name" id="name" class="form-control" required="required" placeholder="name"> </div> <div class="form-group col-md-6"> <input type="tel" pattern="^+91\d{4}\d{3}\d{3}$" id="phone" name="phone" class="form-control" required="required" placeholder="contact number" style="width: 176px;"> </div> <table> <tr><td style="padding-bottom: 118px;"> <table> <tr><td> <div class="form-group col-md-12"> <input type="text" name="business" id="business" class="form-control" required="required" placeholder="business name / company name" style="width: 296px;"> </div> </td></tr> <tr><td> <div class="form-group col-md-6"> <input type="email" name="email" id="email" class="form-control" required="required" placeholder="email" style="width: 296px;height: 34px;"> </div> </td></tr> <tr><td> </td></tr> <tr><td> <div class="form-group col-md-4"style="width: 150px; padding-left: 20px; margin-left: 20px;"> <textarea name="productid" id="productid" class="form-control" required="required" placeholder="product id" style="width: 121px;height: 78px;"></textarea> </div> <div class="form-group col-md-4"style="width: 155px; padding-left: 35px;"> <textarea name="productquantity" id="productquantity" class="form-control" required="required" placeholder="qty" style="width: 71px;height: 78px;"></textarea> </div> </td></tr> </table> </td> <td style="padding-bottom: 170px;"> <div class="form-group col-md-6" style="height: 200px;width: 530px;padding-left: 5px;"> <textarea name="shippingaddress" id="shippingaddress" class="form-control"rows="5" placeholder="shipping address" required="required" style="height: 199px;width: 326px;margin-left: 0px;"></textarea> </div> </td> </tr> </table> </fieldset> </form> </td> <td></td> <form action="cart.php" method="post" class="last"> <fieldset> <input type="hidden" name="business" value="info@domain.com" /> <input type="hidden" name="cmd" value="_cart" /> <input type="hidden" name="display" value="1" /> <input type="hidden" name="return" value="http://www.minicartjs.com/?success" /> <input type="hidden" name="cancel_return" value="http://www.minicartjs.com/?cancel" /> <input type="image" name="submit" value="click here edit / cancel items in cart" class="button" style="margin-left: 750px;"/> </fieldset> </form> </td> </div> </tr> </table><p><input type="submit" id="submit-order" value="confirm order" class="btn" /></p></form> </div> </div> <script> // mini cart paypal.minicart.render({ action: 'cart.php' }); if (~window.location.search.indexof('reset=true')) { paypal.minicart.reset(); } </script>
to save page image, can use http://html2canvas.hertzen.com/
example:
var canvas = document.getelementbyid("mycanvas"); var img = canvas.todataurl("image/png"); document.write('<img src="'+img+'"/>');
Comments
Post a Comment