Object required: 'myXmlDoc.documentElement'
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENER0ATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<form name="form1" method="get">
<p>empdata <input type="text" name="empno" size="20">
FirstName <input type="text" name="FristName" size="20">
<input type="submit" value="Submit" name="B1"></p>
<p> </p>
</form>
<%
if request.form("B1")="Submit" then
Response.Write empdata("12345")
Function pandata(empno)
Dim webServiceUrl, httpReq, node, myXmlDoc
webServiceUrl = "http://localhost/webservices/MyWebService.asmx/empdata?empno='12345'"
Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")
httpReq.Open "GET", webServiceUrl, False
httpReq.Send
Set myXmlDoc = Server.CreateObject("MSXML.DOMDocument")
myXmlDoc.load(httpReq.responseBody)
Set httpReq = Nothing
Set node = myXmlDoc.documentElement.selectSingleNode("//empdata1")
If Not node Is Nothing Then
empdata = node.text
Exit Function
Else
empdata = "<b>There is no data associated with this empno.</b>"
Exit Function
End If
End Function
--------------------------------------------------------------
thanks in advance
End Function
End If
%>
</body>
</html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENER0ATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<form name="form1" method="get">
<p>empdata <input type="text" name="empno" size="20">
FirstName <input type="text" name="FristName" size="20">
<input type="submit" value="Submit" name="B1"></p>
<p> </p>
</form>
<%
if request.form("B1")="Submit" then
Response.Write empdata("12345")
Function pandata(empno)
Dim webServiceUrl, httpReq, node, myXmlDoc
webServiceUrl = "http://localhost/webservices/MyWebService.asmx/empdata?empno='12345'"
Set httpReq = Server.CreateObject("MSXML2.ServerXMLHTTP")
httpReq.Open "GET", webServiceUrl, False
httpReq.Send
Set myXmlDoc = Server.CreateObject("MSXML.DOMDocument")
myXmlDoc.load(httpReq.responseBody)
Set httpReq = Nothing
Set node = myXmlDoc.documentElement.selectSingleNode("//empdata1")
If Not node Is Nothing Then
empdata = node.text
Exit Function
Else
empdata = "<b>There is no data associated with this empno.</b>"
Exit Function
End If
End Function
--------------------------------------------------------------
thanks in advance
End Function
End If
%>
</body>
</html>
Last edited: