3 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
\r
5 .altrow { background-color: lightgrey; }
\r
8 <script type='text/javascript' src='../iwfcore.js'></script>
\r
10 <script type='text/javascript'>
\r
12 function testError(s){
\r
13 alert("Test page error: Could not locate element with id of '" + s + "'");
\r
17 function getSource(id){
\r
18 var el = iwfGetById(id);
\r
20 return testError(id);
\r
26 function getTarget(id){
\r
27 var el = getSource(id);
\r
29 var tgt = iwfGetById(el.value);
\r
31 alert('No element exists on this page with an id attribute of "' + el.value + '"');
\r
40 function testGetById(){
\r
41 var tgt = getTarget('txtGetById');
\r
43 alert(iwfElementToString(tgt));
\r
47 function testXmlEncode(){
\r
48 var el = getSource('txtXmlEncode');
\r
49 alert(el.innerText);
\r
51 alert(iwfXmlEncode(el.innerText));
\r
60 <h1>Tester for iwfcore.js</h1>
\r
64 <table width='80%' cellpadding='5' cellspacing='0' border='0'>
\r
70 <td>iwfGetById(idOfElement)</td>
\r
71 <td><input type='text' id='txtGetById' value='txtGetById' /><br /><input type='button' onclick='javascript:testGetById();' value='Test' /></td>
\r
74 <td>iwfXmlEncode(textToEncode)</td>
\r
75 <td><textarea id='txtXmlEncode' rows='5' cols='40'>This isn't a "cool" test harness, but it is > worthless && < awesome.</textarea><br /><input type='button' onclick='javascript:testXmlEncode();' value='Test' /></td>
\r