Hi Guys,
I used an example from adobe.com to make a spry scoreboard that automatically updates the scores from an xml document. I took it futher and have had some success, but when I put it live I found out that it will not update in internet explorer unless clearing history, or opening a new tab then going back.
It works great in firefox and safari, and will update as soon as I change the xml, then upload to my server. Any help would be greatly appreciated. I have searched long and hard for a solution, and it looks like I.E caching may be the culprit. How to get around this though I do not know.
I have put up the demo files from the example as it has the same issue regarding I.E
Thank you!!
Rich
http://www.richyobrien.com/spry_scoreboard/my_scores.html -
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
-
[
-
<!ENTITY % SPRY SYSTEM "http://www.adobe.com/dtd/spry.dtd">
-
%SPRY;
-
]>
-
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-
<title>My Score Board</title>
-
<style type="text/css">
-
html, body {
-
font-size:0px;
-
margin:0px;
-
padding:0px;
-
}
-
*html, *body {
-
margin-top:-2px;
-
}
-
.games {
-
font-size:12px;
-
font-family:Arial;
-
color:#000;
-
}
-
.SpryHiddenRegion {
-
display: none;
-
}
-
</style>
-
<script language="JavaScript" type="text/javascript" src="xpath.js"></script>
-
<script language="JavaScript" type="text/javascript" src="SpryData.js"></script>
-
<script language="JavaScript" type="text/javascript" src="SpryEffects.js"></script>
-
<script type="text/javascript">
-
<!--//
-
var dsGames = new Spry.Data.XMLDataSet("games.xml", "games/game"); // Load the Overall Game information
-
var dsHome = new Spry.Data.XMLDataSet("games.xml", "/games/game/home", { subPaths: ["teamStats", "teamStats/score" ], useCache:false, loadInterval:3000}); // Load all of the Home Team Information
-
var dsAway =new Spry.Data.XMLDataSet("games.xml", "/games/game/away", { subPaths: ["teamStats", "teamStats/score" ], useCache:false, loadInterval:3000}); // Load all of the Away Team Imformation
-
-
var HScoreHolder = new Array(); // Home Score Holder
-
var AScoreHolder = new Array(); // Away Score Holder
-
var scoreHolder = new Array(); // Generic Score Holder
-
-
function GetScoreUpdateFunc(scoreHolder, prefixStr){ // Get score function
-
return function (ds, row, rowIndex){ // return the actual filter function
-
-
var key = prefixStr+row['teamStats/score/@quarter']; // create a key for the games
-
-
if(scoreHolder[key]){ // check for keys already set
-
if(row['teamStats/score'] != scoreHolder[key]){ // check to see if the scores match. If they don't, then show the update
-
Spry.Effect.DoHighlight(key,{duration:3000,from:'#FB9A00', to:'#fff', restoreColor:'#fff'});// highlight the updated score box
-
}
-
}
-
-
scoreHolder[key]= new Array(); // make each key an array
-
scoreHolder[key]= row['teamStats/score']; // get the current scores
-
return row; // return the regular dataset
-
};
-
}
-
-
-
dsHome.filter(GetScoreUpdateFunc(HScoreHolder, "hq_")); // Filter for home scores... Check for updates
-
dsAway.filter(GetScoreUpdateFunc(AScoreHolder, "aq_")); // Filter for away scores... Check for updates
-
-
//-->
-
-
</script>
-
</head>
-
<body>
-
<div class="games SpryHiddenRegion" spry:detailregion="dsGames dsHome dsAway">
-
<h1>{dsGames::location}</h1>
-
<table cellpadding="0" cellspacing="0" border="1">
-
<tr>
-
<th> </th>
-
<th spry:repeat="dsHome">{dsHome::ds_RowNumberPlus1}</th>
-
<th>Time Outs Used</th>
-
-
<th>Foul Trouble</th>
-
</tr>
-
<tr>
-
<td>{dsHome::teamName}</td>
-
<td spry:repeat="dsHome" id="hq_{dsHome::teamStats/score/@quarter}">{dsHome::teamStats/score}</td>
-
<td>{dsHome::teamStats/@timeOuts}</td>
-
<td>{dsHome::teamStats/@foulTrouble}</td>
-
-
</tr>
-
<tr>
-
<td>{dsAway::teamName}</td>
-
<td spry:repeat="dsAway" id="aq_{dsAway::teamStats/score/@quarter}">{dsAway::teamStats/score}</td>
-
<td>{dsAway::teamStats/@timeOuts}</td>
-
<td>{dsAway::teamStats/@foulTrouble}</td>
-
</tr>
-
-
</table>
-
</div>
-
</body>
-
</html>
-
-
I got some fantastic help on the adobe forums and it's now working great. This was Fabio's answer:
"I solved it adding this bit of code : method:'POST' as in the example below. -
var live_status = new Spry.Data.XMLDataSet("feeds/feed_presence2.xml", "root/row", {useCache:false,loadInterval: 200000, method:'POST'})
-
According to what I read in this forum, using POST will force IE to not cache the data.
Hope it helps."
1 2110
I got some fantastic help on the adobe forums and it's now working great. This was Fabio's answer:
"I solved it adding this bit of code : method:'POST' as in the example below. -
var live_status = new Spry.Data.XMLDataSet("feeds/feed_presence2.xml", "root/row", {useCache:false,loadInterval: 200000, method:'POST'})
-
According to what I read in this forum, using POST will force IE to not cache the data.
Hope it helps."
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Daniel Walzenbach |
last post by:
Hi
I’d like to know, whether it is possible to set enabled = false or visible = false on the tabs of the MultiPage WebControl at runtime (check out...
|
by: William LaMartin |
last post by:
I have recently started checking how accessible my web sites are to the
Pocket PC using Pocket Internet Explorer (PIE).
The main trouble I have discovered is with aspx pages in which I use an...
|
by: pradeep_TP |
last post by:
I am facing a strange problem with my web site. Afer reinstalling the web
application on the web server, I am getting a dialog box for each page. The
dialog box has the following information.
...
|
by: Apu Nahasapeemapetilon |
last post by:
Hello and thank you in advance for your help.
Can anyone think of a reason why this code would work properly on one PC,
but not another?
I've got a System.Windows.Forms.UserControl that...
|
by: johnny15 |
last post by:
I have used below the following parameters in my stylesheet.This give
me a grey background around my tables that contains the sites content.
This works fine using Microsoft Internet Explorer but...
| |
by: Etayki |
last post by:
Hi!
I am new to VB.net and I am using the Visual Basic 2005 Express
Edition
I have two questions:
1. I am trying to write an application that will automate Internet
Explorer and store data...
|
by: mthomsit |
last post by:
Hi,
I have a script which after a time shows the following error in IE:
"A script on this page is causing Internet Explorer to run slowly. If
it continues to run, your computer may become...
|
by: jlackyashdya |
last post by:
hi,
i m developing a xml based image gallery. i wrote code for generating thumbnails using loader component.
its working fine locally. but when i upload it , In Mozilla firefox browser its working...
|
by: wassimdaccache |
last post by:
Hello everybody
It is about a network contains 5 computers connected to a router that I don't have an access on it.
I need to prevent users using the internet explorer and on the same time...
|
by: vbcoder86 |
last post by:
Hi All,
I have an excel macro that I'm running. The code does everything I want except that after about 200 iterations VB will run out of memory and I'll get an "automation error". I'm using the...
|
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...
| |
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,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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...
|
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...
|
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,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |
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...
|
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...
| |