summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/tests/console.html
diff options
context:
space:
mode:
Diffstat (limited to 'framework/Web/Javascripts/tests/console.html')
-rw-r--r--framework/Web/Javascripts/tests/console.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/tests/console.html b/framework/Web/Javascripts/tests/console.html
new file mode 100644
index 00000000..e6aed30f
--- /dev/null
+++ b/framework/Web/Javascripts/tests/console.html
@@ -0,0 +1,30 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
+ "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
+ <head>
+ <title>Prototype Console</title>
+ <script src="../dist/prototype.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ function test() {
+ var out = $('out');
+ try {
+ input = $F('input');
+ out.innerHTML += input.escapeHTML() + '<br />';
+ value = eval(input);
+ out.innerHTML += '=> ' + value.toString().escapeHTML() + '<br />';
+ } catch (e) {
+ out.innerHTML += 'Error: ' + e.toString().escapeHTML() + '<br />';
+ }
+ $('input').value = '';
+ }
+ </script>
+ </head>
+ <body>
+ <form onsubmit="test(); return false">
+ <input type="text" size="60" id="input" />
+ <input type="submit" value="Execute" />
+ </form>
+ <div id="test"></div>
+ <div id="out"></div>
+ </body>
+</html>