Hi,
I am using AJAX to display dynamic RSS feeds in my web page.
So on page load i am callin the AJAX function Start_Timer() The body of Start_Timer() is as follows.
function Start_Timer()
{
getRSS(); //This is the function which gets the RSS feeds and displays it in a div tag in the page.
t=setTimeout("S tart_Timer()",6 000);
}
So according t this code every 6 seconds the function getRSS() should be called which updates the dynamic feed on the web page is it not?
But though the function is called every 6 seconds,it does not display the feed dynamically.Lik e for example if i delete the source feed,the script still displays the feed on the webpage and does not give an error.
Any idea what the problem is how do i rectify it? I would greatly appreciate any help.
Thanks
Satish
7 1876 iam_clint 1,208
Recognized Expert Top Contributor
try t=window.setTim eout("Start_Tim er()",6000);
Hi,
Thanks for your reply. I tried that but it didnt work.In fact even if i try doing a simple document.write( "test") in the page in the function Start_Timer() ,it just executes it once instead of in a periodic manner.
Thanks again
iam_clint 1,208
Recognized Expert Top Contributor
var t=window.setTim eout("Start_Tim er()",6000);
let me see your other function
Hi,
I was testing this application some more with different browsers and I find that it works fine in opera but gives problem(ie not updating dynamic feed) in IE and firefox. I am guessing it is due to some cache problem.
But in my script function I added a line
<CODE> ajaxobject.setR equestHeader("C ache-Control","no-cache") <CODE> where ajaxobject is my XMLHttpRequest( ) object
I thought this would make sure that the web page is updated everytime without using the cache.
Any ideas?
Thanks again
regds
acoder 16,027
Recognized Expert Moderator MVP
You could try something like: - url=url+"&sid="+Math.random();
to prevent caching.
yup...adding a random number to the url worked...
thanks!
acoder 16,027
Recognized Expert Moderator MVP
No problem. You're welcome.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Lanky |
last post by:
I am using the Dynamic Ajax Content script from Dynamic Drive (http://dynamicdrive.com/dynamicindex17/ajaxcontent.htm) and trying to load the Ultimate Fade-In Slide Show also from Dynamic Drive (http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm.) Both work just fine independently, but the slide show script won't work when I try to load it with the Ajax Content Script - as if they are conflicting. Any ideas?
|
by: JohnnieTech |
last post by:
I am using some javascript/ajax to load content into a main div. The problem I am running into is that it will work in IE but not in FF. In FF I don't get any sort of load at all. I have a 1 column 2 row setup in css. The links are in the top div and the content loads in the main div. The only problem I thought may have been causing it was that I had an ID inside of and ID. I changed my links div to a class instead of an ID and that didn't...
|
by: Samik R. |
last post by:
Hello,
I am using the innerHTML property of a div placeholder to update the contents, and the HTML is provided from a perl script on the server side. The perl script gets called through AJAX when I press a button in the first page. The returned HTML in the div has another button, which, when pressed, should call the same perl script again. Think of the program as some sort of wizard.
The problem is, this works perfectly as expected in FF...
|
by: pbd22 |
last post by:
Hi.
This is just a disaster management question.
I am using XMLHTTP for the dynamic loading of content in a very
crucial area of my web site. Same as an IFrame, but using XMLHTTP and
a DIV. I got the core of the javascript from here:
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
I noticed in the demo that sometimes the content takes a long
|
by: Harshpandya |
last post by:
HI all,
I am working on the Ajax and PHP to make dynamic web page application
I have HTML page - in which i am calling two different pages Google and NBC from Drop down menu.
OUTPUT WANTED:
I want the google page displayed under display message on the same page when i select google. and when i select NBC news - i want the NBC news page to be displayed under the display message on same page.
| |
by: Harshpandya |
last post by:
HI all,
I am working on the Ajax and PHP to make dynamic web page application
I have HTML page - in which i am calling two different pages Google and NBC from Drop down menu.
OUTPUT WANTED:
I want the google page displayed under display message on the same page when i select google. and when i select NBC news - i want the NBC news page to be displayed under the display message on same page.
|
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 i change something in php file using in ajax function.it not refreshed,means its shows the previous result it not get updated.i can't understand whats the prob.this is the code i m using:
<?
include("config.inc.php");
//error_reporting(0); ...
|
by: jackrabbithanna |
last post by:
I'm using a ajax script the uses a tabbed div that fetches a remote webpage to display for each tab.when clicked. the script works fine except for one thing. The content of the page i want to display is a javascript image gallery. i am trying to do multiple galleries on one page.
When the page loads the default tab loads the gallery correctly. But when I click on the next tab the javascript gallery fails. The script is exactly the same...
|
by: wenijah |
last post by:
Hi everyone!
First thank you for reading this post and yes, you probably already see that kind of topic title somewhere but the problem I've got today might be different than the 100 topics I've seen so far that did not resolve my problem...
Environment and problem: I have a page A with Ajax.js and a <div id="ajx">Content</div> that changes when clicking on a link. Another page, page B, gets loaded into page A and (tries) to load a...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |