View Full Version : Drawing and converting
01-06-2012, 07: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, 01:24 PM
01-13-2012, 04: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, 08: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, 09: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, 01:49 PM
Sorry if I haven't been too clear in asking my question.
01-20-2012, 02: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 © 2017 vBulletin Solutions, Inc. All rights reserved.