/[webpac2]/trunk/web/iwf/testers/iwfajax.html
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /trunk/web/iwf/testers/iwfajax.html

Parent Directory Parent Directory | Revision Log Revision Log


Revision 46 - (hide annotations)
Mon Nov 14 16:13:17 2005 UTC (18 years, 6 months ago) by dpavlin
File MIME type: text/html
File size: 3486 byte(s)
 r8855@llin:  dpavlin | 2005-11-14 01:49:57 +0100
 added small browser using Interactive Website Framework
 from http://iwf.sourceforge.net

1 dpavlin 46 <html>
2     <head>
3     <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4     <style>
5     .altrow { background-color: lightgrey; }
6     </style>
7    
8     <script type='text/javascript' src='../iwfcore.js'></script>
9     <script type='text/javascript' src='../iwfxml.js'></script>
10     <script type='text/javascript' src='../iwfgui.js'></script>
11     <script type='text/javascript' src='../iwfajax.js'></script>
12    
13     <script type='text/javascript'>
14    
15     function testError(s){
16     alert("Test page error: Could not locate element with id of '" + s + "'");
17     return false;
18     }
19    
20     function getSource(id){
21     var el = iwfGetById(id);
22     if (!el){
23     return testError(id);
24     } else {
25     return el;
26     }
27     }
28    
29     function getTarget(id){
30     var el = getSource(id);
31     if (el){
32     var tgt = iwfGetById(el.value);
33     if (!tgt){
34     alert('No element exists on this page with an id attribute of "' + el.value + '"');
35     return false;
36     } else {
37     return tgt;
38     }
39     }
40     return false;
41     }
42    
43     function testGetById(){
44     var tgt = getTarget('txtGetById');
45     if (tgt){
46     alert(iwfElementToString(tgt));
47     }
48     }
49    
50     function testXmlEncode(){
51     var el = getSource('txtXmlEncode');
52     if (el){
53     alert(iwfXmlEncode(el.innerText));
54     }
55    
56     }
57    
58    
59     function test(w){
60     alert(w);
61     for(var i=0;i<w.attributes.length;i++){
62     alert(w.getAttribute(i));
63     }
64     }
65     </script>
66    
67     </head>
68     <body onclick2='javascript:iwfMoveTo("moveme", iwfEvent(event).X, iwfEvent(event).Y, 10)'>
69     <h1>Tester for iwfajax.js</h1>
70     <a href='javascript:iwfAlignTo("moveme", "formSubmitResults", "tc", "bc", 30);'>Align orange to Result</a><br />
71     <a href='javascript:iwfDockTo("moveme", "iwfContent", "tc", "bc", 30); '>Dock orange to iwfContent</a><br />
72     <a href='javascript:iwfUnDockFrom("moveme", "iwfContent", 30); '>Undock orange from iwfContent</a><br />
73     <a href='javascript:iwfMoveTo("iwfContent", 300, 300, 10); '>Move iwfContent</a><br />
74     <a href='javascript:iwfMoveTo("iwfContent", 100, 500, 10); '>Reset iwfContent</a><br />
75     <div id='moveme' style='background-color:orange; width:100px; top:10px; left:50px;position:absolute'>This should move</div><br />
76     <a href='javascript:iwfMoveTo("moveme", 0, 0, 20); iwfShowGently("moveme", 5)'>reset orange box</a><br />
77     <form action='iwfajaxpost.php' method='get' name='frmGet' iwfTarget='formSubmitResults'>
78     <input type='hidden' value='hidden get value' name='hidValue' />
79     <input type='button' value='HTTP GET' name='btnGet' onclick='javascript:iwfRequest(this);' />
80     <a href='javascript:iwfRequest("frmGet")'> GET via anchor</a>
81     </form>
82     <form action='iwfajaxpost.php' method='post' id='frmPost' iwfTarget='formSubmitResults'>
83     <input type='hidden' value='hidden post value' name='hidValue' />
84     <input type='button' value='HTTP POST' name='btnPost' onclick='javascript:iwfRequest(this);' />
85     <a href='javascript:iwfRequest("frmPost", "formSubmitResults")'> POST via anchor</a>
86     </form>
87     <p>
88     <button onclick='javascript:iwfShowLog()'>Show IWF Log</button>
89     </p>
90     <div id='formSubmitResults' style='border:1px solid black;'>
91     Results of form submittal should show up here.
92     </div>
93     <div id='iwfContent' style='border:3px solid blue; position:absolute;top:500px;left:100px;'>
94     If they show up here, there is problems! iwfTarget is not being recognized...
95     </div>
96     </body>
97     </html>

Properties

Name Value
svn:mime-type text/html

  ViewVC Help
Powered by ViewVC 1.1.26