View Full Version : Drawing and converting
01-06-2012, 06:33 PM
Hi, I was wondering - how can I convert something that a user draws inside canvas? Say, they draw a square, how could I convert that to print "You have drawn a square" - this would be posted to a text file.
Thanks in advance. :)
01-11-2012, 12:24 PM
01-13-2012, 03:09 AM
How did the user draw the square? Did s/he use your draw-a-square function or put in four separate line segments for you to recognize as a square?
01-16-2012, 07:39 PM
Thank you for your response.
It basically draws a square altogether (not 4 seperate lines).
Any advice would be greatly appreciaited. :)
01-16-2012, 08:56 PM
It basically draws a square altogether.
Whatever "it" is in that sentence (some kind of draw-a-square function?) can state, "You drew a square."
I expect that I'm not properly understanding the question.
01-20-2012, 12:49 PM
Sorry if I haven't been too clear in asking my question.
01-20-2012, 01:22 PM
var mystring = "......"; // string to be posted to the server
var http = new XMLHttpRequest();
http.open('POST', 'StoreAsTxt.php', true);
http.send('txt=' + encodeURIComponent(mystring));
The PHP side may be solved by someone else ... I am not much into PHP. The text will be available in PHP as $_POST["txt"]
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.