1<html> 2<head><title>JavaScript SOAP::Lite for COM Examples</title></head> 3<body> 4 5<script language="javascript"><!-- 6 7// .create() here is synonim for .new(), because new() is reserved in JavaScript 8 9var objPerlCOM = new ActiveXObject("SOAP.Lite"); 10var SOAP = objPerlCOM.create(); 11SOAP.proxy("http://localhost/") 12 .uri("http://www.soaplite.com/My/Examples"); 13 14function getStateName (form) { 15 form.result.value = SOAP.getStateName(form.state.value).result(); 16} 17 18//--></script> 19 20<h1>SOAP::Lite Examples</h1> 21<hr> 22 23<form name="states"> 24<input type="text" name="state" value="25" size="3" maxlength="3"> 25<input type="button" value="getStateName" onclick="getStateName(states);"> 26<input type="text" name="result" readonly> 27</form> 28 29<hr> 30 31<pre> 32<script language="javascript"><!-- 33 34var objPerlCOM = new ActiveXObject("SOAP.Lite"); 35var SOAP = objPerlCOM.create(); 36SOAP.proxy("http://localhost/") 37 .uri("http://www.soaplite.com/My/Examples"); 38 39function getStateName (form) { 40 form.result.value = SOAP.getStateName(form.state.value).result(); 41} 42 43//--></script> 44</pre> 45 46</body> 47</html> 48