summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts/tests/Insertion.html
diff options
context:
space:
mode:
authorxue <>2005-12-05 01:00:16 +0000
committerxue <>2005-12-05 01:00:16 +0000
commitccf76e430b7703db028966a845a966f50956f490 (patch)
tree9762b746f8b7d432dbe5e5cb8f38f90007e0e1b5 /framework/Web/Javascripts/tests/Insertion.html
parent418baf36d477bcbdd6fb4eaf4037ea6a2d93f21c (diff)
Diffstat (limited to 'framework/Web/Javascripts/tests/Insertion.html')
-rw-r--r--framework/Web/Javascripts/tests/Insertion.html47
1 files changed, 47 insertions, 0 deletions
diff --git a/framework/Web/Javascripts/tests/Insertion.html b/framework/Web/Javascripts/tests/Insertion.html
new file mode 100644
index 00000000..1aefd3aa
--- /dev/null
+++ b/framework/Web/Javascripts/tests/Insertion.html
@@ -0,0 +1,47 @@
+<html>
+<head>
+ <script type="text/javascript" src="../../base.js"></script>
+ <script type="text/javascript" src="../../dom.js"></script>
+ <script type="text/javascript" src="../../form.js"></script>
+ <script type="text/javascript">
+ function test() {
+ var type = Form.Element.getValue('type');
+ var html = '<div>' + Form.Element.getValue('content') + '</div>';
+ new Insertion[type]($('a'), html);
+ return false;
+ }
+ </script>
+
+ <style type="text/css">
+ div#a {
+ border: 2px solid blue;
+ padding: 10px;
+ margin-bottom: 10px;
+ }
+
+ div#a div {
+ border: 1px solid red;
+ padding: 5px;
+ }
+
+ textarea {
+ display: block;
+ }
+ </style>
+</head>
+<body>
+ <div id="a">
+ content
+ </div>
+ <fieldset>
+ <textarea id="content" rows="10" cols="60"></textarea>
+ <select id="type">
+ <option value="Before">Before</option>
+ <option value="Top">Top</option>
+ <option value="Bottom">Bottom</option>
+ <option value="After">After</option>
+ </select>
+ <button onclick="return test()">Create Insertion</button>
+ </fieldset>
+</body>
+</html> \ No newline at end of file