473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

problem with Microsoft.XMLHTTP post to an isapi dll

Hi,

I have an asp page that allows a user to search for info in a DB and
add info to a DB. The search uses "ADODB.Connection" objects in the
page, but the add will use a call to an isapi dll via the
"Microsoft.XMLHTTP" object. The results of the isapi dll will be
displayed to the user without refreshing the asp page.

I have a code snippet below for the isapi call. WHat is happening is
that the xmlhttp.responseText from the snippet below is empty after a
call to the isapi dll (the isapi dll is not getting hit). If I take
the url created below and stick it in a browser, I get the isapi
response that I expect. A subsequent call to the function below will
then succeed, but the isapi dll is still not getting hit. It seems
that the function will only succeed if there is a cached request (and
again, no interaction with isapi dll).

If anyone could look at the code below and let me know what I might be
doing wrong, I would greatly appreciate it.

Thanks in advance,
Irene

<script language="javascript">

function handleAddClick() {
var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");

var url = "http://localhost/Scripts/isapiYYY.dll?VPAddCustomerOrder";
url = url + "&CustomerNum=" + document.theForm.custNo.value;
url = url + "&OrderNum=" + document.theForm.orderNo.value;
url = url + "&CustName=" + document.theForm.custName.value;
url = url + "&CustEmail=" + document.theForm.custEmail.value;

alert(url);

xmlhttp.Open("POST", url, false);
alert("opened the POST");
xmlhttp.Send();
alert("sent the request");
var resp = xmlhttp.responseText;
alert(resp);

}
</script>
Jul 19 '05 #1
4 3192
Irene wrote:
Hi,

I have an asp page that allows a user to search for info in a DB and
add info to a DB. The search uses "ADODB.Connection" objects in the
page, but the add will use a call to an isapi dll via the
"Microsoft.XMLHTTP" object. The results of the isapi dll will be
displayed to the user without refreshing the asp page.

I have a code snippet below for the isapi call. WHat is happening is
that the xmlhttp.responseText from the snippet below is empty after a
call to the isapi dll (the isapi dll is not getting hit). If I take
the url created below and stick it in a browser, I get the isapi
response that I expect. A subsequent call to the function below will
then succeed, but the isapi dll is still not getting hit. It seems
that the function will only succeed if there is a cached request (and
again, no interaction with isapi dll).

If anyone could look at the code below and let me know what I might be
doing wrong, I would greatly appreciate it.

Thanks in advance,
Irene

<script language="javascript">

function handleAddClick() {
var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");

var url =
"http://localhost/Scripts/isapiYYY.dll?VPAddCustomerOrder"; url = url


Where did you get the idea that you could submit directly to the isapi.dll?
I've always used xnlhttp to submit to an asp page on the server. I've never
seen an example of submitting directly to isapi.dll. Do you have a link to
some documentation stating that this is possible?

Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
Hi Bob,

No, I have not seen any documentation for this. To be honest, I
thought that you could use different urls with xmlhttp, but the
example just happened to be for an asp page.

I first tried a real simple dummy example to make a request to the
isapi dll and get a response back, and that worked fine, so I assumed
I could do this (but now that I think of it, I may have tried the
request via the browser first and not realized that the asp request
was just using a cached result).

Are you saying that I cannot do this? If so, would you mind
explaining why? Please pardon my ignorance if it is something
obvious.

Thanks very much,
Irene


"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message news:<ui**************@TK2MSFTNGP12.phx.gbl>...
Irene wrote:
Hi,

I have an asp page that allows a user to search for info in a DB and
add info to a DB. The search uses "ADODB.Connection" objects in the
page, but the add will use a call to an isapi dll via the
"Microsoft.XMLHTTP" object. The results of the isapi dll will be
displayed to the user without refreshing the asp page.

I have a code snippet below for the isapi call. WHat is happening is
that the xmlhttp.responseText from the snippet below is empty after a
call to the isapi dll (the isapi dll is not getting hit). If I take
the url created below and stick it in a browser, I get the isapi
response that I expect. A subsequent call to the function below will
then succeed, but the isapi dll is still not getting hit. It seems
that the function will only succeed if there is a cached request (and
again, no interaction with isapi dll).

If anyone could look at the code below and let me know what I might be
doing wrong, I would greatly appreciate it.

Thanks in advance,
Irene

<script language="javascript">

function handleAddClick() {
var xmlhttp = new ActiveXObject ("Microsoft.XMLHTTP");

var url =
"http://localhost/Scripts/isapiYYY.dll?VPAddCustomerOrder"; url = url


Where did you get the idea that you could submit directly to the isapi.dll?
I've always used xnlhttp to submit to an asp page on the server. I've never
seen an example of submitting directly to isapi.dll. Do you have a link to
some documentation stating that this is possible?

Bob Barrows

Jul 19 '05 #3
Irene wrote:
Hi Bob,

No, I have not seen any documentation for this. To be honest, I
thought that you could use different urls with xmlhttp, but the
example just happened to be for an asp page.

I first tried a real simple dummy example to make a request to the
isapi dll and get a response back, and that worked fine, so I assumed
I could do this (but now that I think of it, I may have tried the
request via the browser first and not realized that the asp request
was just using a cached result).

Are you saying that I cannot do this? If so, would you mind
explaining why? Please pardon my ignorance if it is something
obvious.


The destination url in the call to xmlhttp needs to be a destination that
can process a Request and return a Response. I.E., it has to be a url that
you can use in the action attribute of a FORM tag. AFAIK, only a .asp page
meets these requirements.

Now, if the isapi.dll meets these requirements, I guess there is no reason
it can't work in xmlhttp, but, I neither know of any reason it should work
nor any other reason beyond the above why it shouldn't.
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #4
Hello,

I ended up changing the 'POST' in 'xmlhttp.Open("POST", url, false);'
to a 'GET' and it works now!

Thanks again for your responses.

Irene
"Bob Barrows" <re******@NOyahoo.SPAMcom> wrote in message news:<ej**************@TK2MSFTNGP10.phx.gbl>...
Irene wrote:
Hi Bob,

No, I have not seen any documentation for this. To be honest, I
thought that you could use different urls with xmlhttp, but the
example just happened to be for an asp page.

I first tried a real simple dummy example to make a request to the
isapi dll and get a response back, and that worked fine, so I assumed
I could do this (but now that I think of it, I may have tried the
request via the browser first and not realized that the asp request
was just using a cached result).

Are you saying that I cannot do this? If so, would you mind
explaining why? Please pardon my ignorance if it is something
obvious.


The destination url in the call to xmlhttp needs to be a destination that
can process a Request and return a Response. I.E., it has to be a url that
you can use in the action attribute of a FORM tag. AFAIK, only a .asp page
meets these requirements.

Now, if the isapi.dll meets these requirements, I guess there is no reason
it can't work in xmlhttp, but, I neither know of any reason it should work
nor any other reason beyond the above why it shouldn't.
Bob Barrows

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: msnews.microsoft.com | last post by:
Hi, I am having a problem that the gateway I am working with removes the "=" sign from values in the postfield that are empty. Example: page.asp?aa=&ff=&xx=12 become: page.asp?aa&ff&xx=12....
3
by: Dana | last post by:
I am having a problem with the following code: Response.CharSet = "UTF-8" url = "http://www.domain.com/myisapi.dll" set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "POST", url,...
4
by: Jeeran | last post by:
We use an ISAPI filter to convert long urls into short clean ones. For example: "Site.com/user/john/" Is re-written as: "Site.com/user/userinfo.aspx?uid=john" Now, "userinfo.aspx" contains a...
1
by: ScriptProblem | last post by:
Hi Guys, I have a security concern with Mozilla and Netscape browsers(In IE it gives secuirity pop window) in Remote server(Client's server).When I am trying to call an Asp.NET web service from...
2
by: Georgy Malyshev | last post by:
Hello, All! I have a simplistic ASP application, only default.asp file without any scripts just HTML to say "Hello world!". It is running under IIS 5.1 on XP SP2 machine. I also have some...
0
by: wasif | last post by:
I am trying to upload file using ajax and php but having some problems. it always says that there was a problem and file is not uploaded. here is the code form and ajax code <!DOCTYPE html...
2
by: K. | last post by:
Hello! I have the following problem. I have form div which is replaced by ajax event. Unofrtunately all the ajax inputs are null after posting the form (method="post") in Firefox, but on...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
47
by: mukeshrasm | last post by:
Hi I am calling two pages using Ajax Get_Pages.php and Get_Content.php from combo box. Both pages are displayed based on selection from combo box. Main problem is that it is not showing the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.