On the remote server, there is a form that requests the license number, licensee name, and domain name. This form, when accessed directly just searches the database for info and returns the record using ASP. I am trying to use Microsoft's XMLHTTP Object as exampled on
http://www.4guysfromrolla.com/webtech/110100-1.2.shtml to post this information to the form, but I just keep getting the form returned in my browser, with no results. (I have checked to make sue my servers are capable of running this code by running the example on their website on mine first.)
For some reason it is not posting the data???
The form is like this:
(removed the formatting to make it easier to read)
<<
http://www.remotedomain.com/licenses/Licensessrch.asp>
>
<form action="
http://www.remotedomain.com/licenses/Licensessrch.asp" method="post">
<input type="text" name="x_licensenumber" size="30" maxlength="255" value="<%= Server.HTMLEncode(x_licens
enumber&""
) %>">
<input type="text" name="x_licensename" size="30" maxlength="255" value="<%= Server.HTMLEncode(x_licens
ename&"") %>">
<input type="text" name="x_domainname" size="30" maxlength="255" value="<%= Server.HTMLEncode(x_domain
name&"") %>">
<input type="submit" name="Action" value="Search">
</form>
THE local server is requesting the info as follows:
<<
http://localdomain.com/xmlpost.asp>>
<%
Response.Buffer = True
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Micro
soft.XMLHT
TP")
' Notice the two changes in the next two lines:
xml.Open "POST", "
http://www.remotedomain.com/licenses/Licensessrch.asp",
False
xml.Send "x_licensename=JaneDoe&x_d
omainname=
localdomai
n.com&x_li
censenumbe
r=12345"
Response.Write xml.responseText
Set xml = Nothing
%>
When all 3 are correct, it submits fine when accessing the form directly. Even when accessing
http://localdomain.com/xmlpost.asp and it brings up the form instead of the data, I can type in the data on the form and it then brings up the data fine.
Start Free Trial