Files
svgedit/editor/extensions/imagelib/index.html
Alexis Deveria a9ea21c521 Added some files missing from last checkin
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1631 eee81c28-f429-11dd-99c0-75d572ba1ddd
2010-07-14 18:08:22 +00:00

27 lines
505 B
HTML

<!doctype html>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<body>
<h1>Select an image:</h1>
<a href="smiley.svg">smiley.svg</a>
</body>
<script>
$('a').click(function() {
// Do ajax request for image's href value
$.get(this.href, function(data) {
// This is where the magic happens!
window.top.postMessage(data, "*");
}, 'html'); // 'html' is necessary to keep returned data as a string
return false;
});
</script>