473,473 Members | 1,838 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Spry scoreboard using xml not updating in internet explorer.

2 New Member
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

Expand|Select|Wrap|Line Numbers
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
  3. [
  4.      <!ENTITY % SPRY SYSTEM "http://www.adobe.com/dtd/spry.dtd">
  5.      %SPRY;
  6. ]>
  7. <html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
  10. <title>My Score Board</title>
  11. <style type="text/css">
  12. html, body {
  13.      font-size:0px;
  14.      margin:0px;
  15.      padding:0px;
  16. }
  17. *html, *body {
  18.      margin-top:-2px;
  19. }
  20. .games {
  21.      font-size:12px;
  22.      font-family:Arial;
  23.      color:#000;
  24. }
  25. .SpryHiddenRegion {
  26.      display: none;
  27. }
  28. </style>
  29. <script language="JavaScript" type="text/javascript" src="xpath.js"></script>
  30. <script language="JavaScript" type="text/javascript" src="SpryData.js"></script>
  31. <script language="JavaScript" type="text/javascript" src="SpryEffects.js"></script>
  32. <script type="text/javascript">
  33. <!--//
  34. var dsGames = new Spry.Data.XMLDataSet("games.xml", "games/game"); // Load the Overall Game information
  35. 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
  36. 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
  37.  
  38. var HScoreHolder = new Array(); // Home Score Holder
  39. var AScoreHolder = new Array(); // Away Score Holder
  40. var scoreHolder = new Array(); // Generic Score Holder
  41.  
  42. function GetScoreUpdateFunc(scoreHolder, prefixStr){ // Get score function
  43.      return function (ds, row, rowIndex){ // return the actual filter function
  44.  
  45.           var key = prefixStr+row['teamStats/score/@quarter']; // create a key for the games          
  46.  
  47.           if(scoreHolder[key]){ // check for keys already set
  48.                if(row['teamStats/score'] != scoreHolder[key]){ // check to see if the scores match. If they don't, then show the update
  49.                     Spry.Effect.DoHighlight(key,{duration:3000,from:'#FB9A00', to:'#fff', restoreColor:'#fff'});// highlight the updated score box
  50.                }
  51.           }
  52.  
  53.           scoreHolder[key]= new Array(); // make each key an array
  54.           scoreHolder[key]= row['teamStats/score']; // get the current scores
  55.           return row; // return the regular dataset
  56.      };
  57. }
  58.  
  59.  
  60. dsHome.filter(GetScoreUpdateFunc(HScoreHolder, "hq_")); // Filter for home scores... Check for updates
  61. dsAway.filter(GetScoreUpdateFunc(AScoreHolder, "aq_")); // Filter for away scores... Check for updates
  62.  
  63. //-->
  64.  
  65. </script>
  66. </head>
  67. <body>
  68. <div class="games SpryHiddenRegion" spry:detailregion="dsGames dsHome dsAway">
  69.   <h1>{dsGames::location}</h1>
  70.   <table cellpadding="0" cellspacing="0" border="1">
  71.     <tr>
  72.       <th>&nbsp;</th>
  73.       <th spry:repeat="dsHome">{dsHome::ds_RowNumberPlus1}</th>
  74.       <th>Time Outs Used</th>
  75.  
  76.       <th>Foul Trouble</th>
  77.     </tr>
  78.     <tr>
  79.       <td>{dsHome::teamName}</td>
  80.       <td spry:repeat="dsHome" id="hq_{dsHome::teamStats/score/@quarter}">{dsHome::teamStats/score}</td>
  81.       <td>{dsHome::teamStats/@timeOuts}</td>
  82.       <td>{dsHome::teamStats/@foulTrouble}</td>
  83.  
  84.     </tr>
  85.     <tr>
  86.       <td>{dsAway::teamName}</td>
  87.       <td spry:repeat="dsAway" id="aq_{dsAway::teamStats/score/@quarter}">{dsAway::teamStats/score}</td>
  88.       <td>{dsAway::teamStats/@timeOuts}</td>
  89.       <td>{dsAway::teamStats/@foulTrouble}</td>
  90.     </tr>
  91.  
  92.   </table>
  93. </div>
  94. </body>
  95. </html>
  96.  
  97.  
Nov 11 '10 #1

✓ answered by Richard OBrien

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.

Expand|Select|Wrap|Line Numbers
  1. var live_status = new Spry.Data.XMLDataSet("feeds/feed_presence2.xml", "root/row", {useCache:false,loadInterval: 200000, method:'POST'})
  2.  
According to what I read in this forum, using POST will force IE to not cache the data.

Hope it helps."

1 2110
Richard OBrien
2 New Member
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.

Expand|Select|Wrap|Line Numbers
  1. var live_status = new Spry.Data.XMLDataSet("feeds/feed_presence2.xml", "root/row", {useCache:false,loadInterval: 200000, method:'POST'})
  2.  
According to what I read in this forum, using POST will force IE to not cache the data.

Hope it helps."
Nov 12 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
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...
0
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...
6
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. ...
1
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...
7
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...
9
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...
3
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...
0
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...
6
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...
0
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...
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
marktang
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,...
0
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...
0
jinu1996
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...
0
tracyyun
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...
0
agi2029
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,...
1
isladogs
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...
0
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...
0
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...

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.