Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.

Thread Tools Display Modes
Share |
Old 10-30-2016, 06:01 PM
marketingcy marketingcy is offline
Contributing Member
Join Date: 02-01-16
Location: Cyprus
Posts: 55
iTrader: 0 / 0%
Send canvas image to another php page

I'm building a web application which the user will draw his/her signature.
The problem is that the signature is not passing using ajax.
Could anybody help?

HTML Code:
<?php session_start(); ?> <!DOCTYPE html> <head><meta http-equiv="Content-Type" content="text/html; charset=gb18030"> <title>Terms & Conditions applied</title> <style> body { font: normal 100.01%/1.375 "Helvetica Neue",Helvetica,Arial,sans-serif; } </style> <link href="/vasilis/jquery.signaturepad.css" rel="stylesheet"> <!--[if lt IE 9]><script src="flashcanvas.js"></script><![endif]--> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> </head> <body onload=disableBtn();> <center> <form method="post" name="form1" id="forma" action="saveSign.php" class="sigPad"> <div class="sig sigWrapper" style="width:550px;height:155px;"> <div class="typed"></div> <canvas class="pad" id="myCanvas" name="signat" width="550px" height="155px"></canvas> </div><br> <button id="btn1" type="submit">I accept the terms of this agreement.</button> </form> </center> <script> </script> <script src="/vasilis/jquery.signaturepad.js"></script> <script src="/vasilis/json2.min.js"></script> <script> function disableBtn() { document.getElementById("btn1").disabled =true; } function checkAddress(checkbox){ if (checkbox.checked) { document.getElementById("btn1").disabled =false; } </script> <script> var canvas1 = document.getElementById("myCanvas"); var dataUrl = canvas1.toDataURL(); var data= "image="+dataUrl; $.ajax({ type: "POST", url: "saveSign.php", data: data )}; form.submit(); </script> </body> </html>
Reply With Quote



Go Back   Webmaster Forum > Web Development > Coding Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Random Image - New Image Upon Page Refresh daleb545 Web Design Lobby 1 11-15-2011 05:23 PM
Click on an image to send it to your email? ( Do you know a script like that) LoveKey Coding Forum 1 06-04-2011 03:50 PM
WTS : Java script Facebook Apps, update status, send wall, send image, send video.etc sinuwun Content 3 12-17-2010 01:03 PM
Combine codes for Rotating Image on page refresh and choose a image by clicking link? web984 Web Design Lobby 0 06-02-2009 12:14 PM
Send users to one way home page Matador The Webmaster Marketplace 1 06-27-2008 02:30 PM

V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory

All times are GMT -7. The time now is 07:16 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC