javascript - java script and web service- how can I know if service.useService works -
i'm new java script , html. have web service running (i'm sure working).
i have part in html-
<html> <body bgcolor="#e6e6fa"> <head> <title>blog site</title> <script language="javascript"> function initializeservice(){ alert("init"); try{ service.useservice(http://localhost:7777/blogserver.asmx?wsdl,"getblogserver"); } catch(e){alert(e.message);} alert("done"); } var mailaddress, title, body; function createnewentry(){ mailaddress = document.demoform.stringmailaddress.value; title = document.demoform.stringtitle.value; body = document.demoform.stringbody.value; alert("send"); service.getblogserver.callservice("enternewinput", mailaddress, title, body); } function showserveranswertonewentry(){ alert(event.result.value); } </script> </head> <body onload="initializeservice()" id="service" style="behavior:url(webservice.htc)" onresult="showserveranswertonewentry()"> <form name="newinput"> mail address :<br> <input type="text" name="stringmailaddress"/> <br> title :<br> <input type="text" name="stringtitle"/><br> body: <p><textarea name="stringbody" cols="50" rows="10"></textarea></p> <button onclick="createnewentry()">insert new post</button> </form> <p id="result"></p> </body> < /html>
i can see service.useservice(http://localhost:7777/blogserver.asmx?wsdl,"getblogserver"); part not working, don't know why. help?
Comments
Post a Comment