A Digital Age Deserves A Digital Leader

AJAX and Cache in IE

AJAX and Cache in IE

Postby kanaloa » Wed Jul 09, 2008 11:37 pm

I'm having a problem that's a bit over my head when it comes to fixing it.

I have a page with, lets say 3 tabs, at the top. The first tab has my regular body content under it. The other two tabs make AJAX requests for external content, in both cases video and audio respectively.

The tabs all worth great.. video and audio loads fine.

But in IE, once I navigate away from a tab, the audio or video continues to play.

Now on the page below, it's a little different, but same principle. An AJAX popup window that, when closed, keeps on playing video in the background.

http://www.scetv.org/index.php/winthrop/

If you click "Methodology Video Test" on the right menu in IE7 and then close it, it just keeps on playing.

Can I stop this from happening? It's fine in FF.

I figure the solution for the simple issue above will also fix my tabs problem too.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: HI & SC
Real Name: John Derrick

Postby jbullard » Thu Jul 10, 2008 2:13 am

The video can't be found but if I understand you correctly you just need to put a navigate away event that would trigger the video to stop playing. But I would have to see the video actually playing in order to fully understand what is going on.
VP - Software
User avatar
Posts: 3653
Joined: Sun Jun 06, 2004 10:17 pm
Location: Utah
Real Name: Jason Bullard

Postby kanaloa » Thu Jul 10, 2008 3:02 am

I may have broken it when redoing stuff tonight. I tried and tried and finally just got rid of my tabs (for now).

Let me duplicate the setup I had so you can see it in action.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: HI & SC
Real Name: John Derrick

Postby kanaloa » Thu Jul 10, 2008 3:10 am

http://www.scetv.org/index.php/the_big_ ... h_carolina

OK, that should now show the problem in IE.

I fixed it by going to a different script, but I had to give up my tabs, which I'd rather not do if I don't have to.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: HI & SC
Real Name: John Derrick

Postby kanaloa » Thu Jul 10, 2008 1:23 pm

I think I've narrowed this problem to just JQuery material. One new script I used does halt the video on exit, but from the code it looks like he thought that out in advance.

I'd love to be able to achieve the same effect with the tabs. The JS is just over my head though. And I'm not sure if I control it in the main jquery script or the specific tab script (I'm guessing the later).

On the jQuery website they even talk about turning the cache off, but maybe my problem is bigger than just cache. I think it's an event not ending like you said above. So I need to find a way to end or close the event when I change tabs.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: HI & SC
Real Name: John Derrick

Postby jbullard » Thu Jul 10, 2008 7:56 pm

The actual page that is called when you click on the video tab is it SWF or another type of video format? You might be able to send an even through PHP to that page to cause it to pause or stop.
VP - Software
User avatar
Posts: 3653
Joined: Sun Jun 06, 2004 10:17 pm
Location: Utah
Real Name: Jason Bullard

Postby kanaloa » Thu Jul 10, 2008 9:58 pm

The page with the video is a template in EE (basically an html file) with a video player embedded in the code.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: HI & SC
Real Name: John Derrick

Postby kanaloa » Fri Jul 11, 2008 12:18 am

Well it's not the fix I wanted exactly, but it seems to work in FF, IE7, and IE6
http://www.scetv.org/index.php/the_big_ ... _carolina/

Looks like the guy who wrote this script found a way to destroy the iframe the content is put in. And that seems to do the trick of clearing the ajax request.
"Greatness is not a function of circumstance. Greatness, it turns out, is largely a matter of conscious choice, and discipline." - Jim Collins
President
User avatar
Posts: 11795
Joined: Sun Mar 10, 2002 1:18 am
Location: HI & SC
Real Name: John Derrick

Return to HTML, CSS, and Scripts

Who is online

Users browsing this forum: No registered users and 9 guests