i try to serialize raphael’s canvas to send it via form and get a png file.
in my section i have:
<script type="text/javascript" src="javascripts/jquery-1.6.4.js"></script>
<script type="text/javascript" src="javascripts/raphael.js"></script>
<script type="text/javascript" src="javascripts/raphael.serialize.js"></script>
and in window.onload = function () { … i do some drawings, then i have some that i use as a buttons, but when i try to get a serialized value of raphael’s canvas i get empty array.
$('#btnEmail').click(function() {
$("input#jsonsvg").val(paper.serialize.json());
});
what’s wrong with this code?
try to go to http://alfen.linuxpl.info/konf/foundation/index_2.html and click on a ‘Wyslij email’3rd blue button from the left that shoud fire up an event to paper.serialize()
i appreaciate any help. thanks
It’s likely to be a problem with Raphael V2.0. The author has removed namespace functionality and it’s caused a lot of plugins that worked with the previous version to now break. Do you get any JS errors?
My advice is to create your own serialize function.