Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Windows.XMLHttp not working for every request Windows.XMLHttp not working for every request
Previous
 
Next
New Post
1/20/2008 8:19 AM
 

Hi,

I wondered if someone can help me here

I am using windows.XmlHttp to send a request inside DNN and a XMod module using JavaScript , Below is the code I am running

       
var emailURL = "http://urladdress.com?p1=param1&p2=param2";
    
    var xmlhttp2=null;
    if (window.XMLHttpRequest)
    {
      xmlhttp2=new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
      xmlhttp2=new ActiveXObject("Microsoft.XMLHTTP");
    }

    if (xmlhttp2!=null)
    {
  //    xmlhttp2.onreadystatechange=state_Change;
      xmlhttp2.open("GET",emailURL,true);
      xmlhttp2.send(null);
    }

As you see I don't need callback function because of the nature of the request so I commented this out

This works perfect in FireFox and every continious request to the same page will be sent successfully. But in IE7 it works only for the first time and any other hits won't be sent unless I clear the cache or go to other pages and wait for 10 or 15 minutes. This is quite randon in IE7 but the first hit just after clearing the cache will work. I mean if the above function get called many times in the same page on same button click.

In IE Windows.XMLHttp object doesn't work unless clearing the cashe??

I wondered if anyone can help me as this is really anoying and we have gone through the route of DNN/XMod and end of the project we found this nasty error

PLEASE HELP!

Regards

Behnam

 
New Post
1/22/2008 8:51 AM
 

yeah I came across the same problem. I googled about it and it seems that the browser is caching the XMLHttpRequest query-result pairs. The cache holds query-result pairs; the queries are cache keys and the server results are server results. So, whenever the browser performs an XMLHttpRequest Call, it first checks the cache. If the query is held as a key in the cache, the corresponding value is used as the result, and there is no need to access the server.

Thats the reason whenever you click on that same button with the same parameters across the calling URL, the request never goes to the server and instead the first time response from the server which is stored in the browser cache is used for processing.

It's very quircky but thats only seems to be happening....as of now I dint come across any mechanism about how we can clean up the cache and force a call to the server. if you have come across such a thing then please update..

 

Regards,

Sujit

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Windows.XMLHttp not working for every request Windows.XMLHttp not working for every request


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out