Created
June 25, 2012 12:53
-
-
Save tokapeb/2988415 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html> | |
| <head> | |
| <title>JCSDL Editor | Load query example</title> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> | |
| <link rel="stylesheet" type="text/css" href="jcsdl/jcsdl.min.css" /> | |
| <script type="text/javascript" src="jcsdl/jcsdl.definition.js"></script> | |
| <script type="text/javascript" src="jcsdl/jcsdl.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="jcsdl"></div> | |
| <textarea name="jcsdl-input"></textarea> | |
| <a href="#" id="load-jcsdl">Load query</a> | |
| <script type="text/javascript"> | |
| var editor = new JCSDLGui($("#jcsdl"), { | |
| save : function(code) { | |
| // output the resulting JCSDL code into a textarea | |
| $('textarea[name="jcsdl-output"]').val(code); | |
| } | |
| }); | |
| // read the JCSDL upon clicking the "Load JCSDL" button | |
| $('#load-jcsdl').click(function() { | |
| // read it from the input textarea | |
| var code = $('textarea[name="jcsdl-input"]').val(); | |
| // load it into the editor | |
| editor.loadJCSDL(code); | |
| }); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment