This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Solutions to refresh dynamic content

 
Amir khan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

In my current role,I am using Flash and Xml, the problem i face is if i change anything in the flash(content), I have to open up a new window for the changes to be reflected, just wanted to know if Ajax might help me out to reflect the changes like it does for any other application after a fixed time interval( ie asynchronously)
[Editted to provide meaningful topic]
[ July 13, 2006: Message edited by: David O'Meara ]
 
Sas Jacobs
Author
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Amir

To clarify, are you talking about the fact that Flash doesn't reflect updated external XML content?

You can set up your Flash file to poll the server at regular intervals and reload the content in just the same way that you'd do it using Ajax. Effectively, you're calling a function at regular intervals. JavaScript and Flash ActionScript have much the same functionality in this regard.

Alternatively, you can use a socket server with XMLSockets in Flash to maintain a continuous connection to the XML content and reflect updated content immediately.

Cheers and I hope that helps

Sas
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amir,

Look into FLEX. You do not have to use their builder to use FLEX. Google uses it in their finicial page with the stock window you can drag and drop date ranges and such.

Eric
 
Amir khan
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sas,
Sorry for not putting across the details earlier, the problem is,its not a live layer and i do not want the flash to be continiously updated on the live site, it will use the bandwidth for no reason.I am using flash &xml during development layer, and during content uploading and changes doesnt reflect even if i refresh the page, i have to necessarily reload my page or flush out my cookies n all.

Eric,

I had recommended to them,as it was earlier suggested by you but it was rejected and since they are gonna incorporate Ajax later, i was wondering if ajax can help me with my issues



Also want to inform that we are using our own customized tool, to maintain the consistentcy.

I am still not very clear that Ajax can help me or not


Thanks for your valuable suggestion
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Code use Iframes to refresh the content.

Eric
 
Sas Jacobs
Author
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Amir

Ajax and Flash are both request and response type approaches. This means that they have to poll the server for changes or use some other event to check for changes. Ajax doesn't offer you any advantages over Flash in this regard.

You can force Flash to refresh the interface by appending a changing querystring to the swf URL in the OBJECT and EMBED tags. I often use a timestamp generated with JavaScript.

Cheers

Sas Jacobs
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic