Iframe and Ajax

Ajax Includes script FF1+ IE5+ Opera8+.
Ajax Rotating Includes script FF1+ IE5+ Opera8+

Dynamic Ajax content FF1+ IE5+ Opera7+

http://www.dynamicdrive.com/dynamicindex17/indexb.html

BTW:
it interesting to note that AJAX was just coined in FEB 2005 in an article

Dani AI

Generated

Quick practical note tied to the posts by , and : Ajax-style updates (requesting data asynchronously and updating parts of a page) are now a standard, not just a novelty — but the implementation details and best practices matter. For new code prefer the promise-based Fetch API where available and keep an XHR fallback for older environments; always build with progressive enhancement and feature-detection rather than browser sniffing. (developer.mozilla.org)

A compact, practical pattern (works in legacy browsers and modern ones):

function createXHR() {
  if (window.XMLHttpRequest) return new XMLHttpRequest();
  try { return new ActiveXObject('Msxml2.XMLHTTP'); } catch(e) {}
  try { return new ActiveXObject('Microsoft.XMLHTTP'); } catch(e) {}
  return null;
}

function getJSONxhr(url, cb) {
  var xhr = createXHR();
  if (!xhr) return cb(new Error('XHR not supported'));
  xhr.open('GET', url, true);
  xhr.onreadystatechange = function() {
    if (xhr.readyState !== 4) return;
    if (xhr.status >= 200 && xhr.status < 300) cb(null, JSON.parse(xhr.responseText));
    else cb(new Error('Request failed: ' + xhr.status));
  };
  xhr.send(null);
}

// Modern equivalent with fetch
async function getJSONfetch(url) {
  const res = await fetch(url, { credentials: 'same-origin' });
  if (!res.ok) throw new Error('Network error: ' + res.status);
  return res.json();
}

The two examples above show the minimal checks you need: create the transport, use asynchronous requests, verify readyState/status and parse safely. (developer.mozilla.org)

Common gotchas and quick best-practices:

  • Use feature detection, not user-agent sniffing — it avoids brittle hacks for Opera/IE/etc. (developer.mozilla.org)
  • Cross-origin requests require server CORS headers (Access-Control-Allow-Origin); if a request silently fails, check the console and server response headers. (developer.mozilla.org)
  • Avoid synchronous XHR on the main thread (deprecated); use async callbacks/promises or workers instead. (developer.mozilla.org)
  • Control caching with proper HTTP headers or change the URL (version/hash) when content changes to avoid stale responses. (developer.mozilla.org)

These points address the compatibility concerns raised in the thread and give immediate, testable patterns to use or adapt.

Recommended Answers

All 2 Replies

Why is that interesting? What do you find interesting about it? Why do you feel information regarding AJAX would be of interest? Is it a "trend", or a core technology? Do YOU use AJAX, if so, why?

Do you have any questions about AJAX?

Why are you quoting hyperlinks from another site? What benefit does that bring to Daniweb or forum members?

I think AJAX will be the next trend web technologies. You can open the web and click link without refreshing your browser. I think it will be the web operating system. IBM, Google and other big companies will support AJAX.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.