summaryrefslogtreecommitdiff
path: root/tests/FunctionalTests/features/protected
diff options
context:
space:
mode:
authorwei <>2006-07-03 04:12:56 +0000
committerwei <>2006-07-03 04:12:56 +0000
commit674353eec4d0a2ee006302720bf6df07ae3e9852 (patch)
tree41969f2e513b9e7ec957507c5cc45de6e625010c /tests/FunctionalTests/features/protected
parentb359ed2bbd48ed4c9000eb507ee2d78aa5130cc0 (diff)
Add TStylesheet and update TClientScript
Diffstat (limited to 'tests/FunctionalTests/features/protected')
-rw-r--r--tests/FunctionalTests/features/protected/pages/ClientScripTest.page30
-rw-r--r--tests/FunctionalTests/features/protected/pages/test.js4
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/FunctionalTests/features/protected/pages/ClientScripTest.page b/tests/FunctionalTests/features/protected/pages/ClientScripTest.page
new file mode 100644
index 00000000..8dbf7133
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/ClientScripTest.page
@@ -0,0 +1,30 @@
+<com:TContent ID="Content">
+ <h1>ClientScript Test</h1>
+
+ <com:TClientScript ScriptUrl=<%~ test.js %> ScriptPosition="Head">
+ if(typeof(ClientScriptInfo) == "undefined")
+ ClientScriptInfo = [];
+ ClientScriptInfo.push("ok 3?")
+ </com:TClientScript>
+
+ <com:TClientScript ScriptPosition="Begin">
+ if(typeof(ClientScriptInfo) == "undefined")
+ ClientScriptInfo = [];
+ ClientScriptInfo.push("ok 2!")
+ </com:TClientScript>
+
+ <com:TLabel ID="label1" Text="Label 1" />
+ <input type="button" id="button1" value="update" />
+
+ <com:TClientScript ScriptPosition="End" UsingPradoScripts="prado">
+ Event.observe("button1", "click", function()
+ {
+ element = $("<%= $this->label1->ClientID %>");
+ if(element)
+ element.innerHTML = inspect(ClientScriptInfo);
+ else
+ alert("failed");
+ });
+ </com:TClientScript>
+
+</com:TContent> \ No newline at end of file
diff --git a/tests/FunctionalTests/features/protected/pages/test.js b/tests/FunctionalTests/features/protected/pages/test.js
new file mode 100644
index 00000000..e8e80b19
--- /dev/null
+++ b/tests/FunctionalTests/features/protected/pages/test.js
@@ -0,0 +1,4 @@
+if(typeof(ClientScriptInfo) == "undefined")
+ ClientScriptInfo = [];
+
+ClientScriptInfo.push("ok") \ No newline at end of file