Trouble with iframe and back button

This is a discussion on "Trouble with iframe and back button" within the JavaScript Forum section. This forum, and the thread "Trouble with iframe and back button are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 10th, 2008, 13:27
Reputable Member
Join Date: Jul 2007
Location: Windsor, ON, Canada
Age: 19
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
Question Trouble with iframe and back button

(Not sure if this is the right section, but since it's probably a javascript solution)

Alright, my video pages (example here) use an iframe that links to a lightweight page with some code for a flash video player.
Code:
HTML: Select all
<object type="application/x-shockwave-flash" width="400" height="350" id="videoaudioicon" style="margin: 0px auto;" data="http://pyramidia.webs.com/Flash/PyramidiaPlayer.swf?vidFile=BMV01.flv">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="http://pyramidia.webs.com/Flash/PyramidiaPlayer.swf?vidFile=BMV01.flv" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
</object>
When you click a thumbnail (feel free to recommend alternate designs for that), it triggers some simple javascript that changes the title and description displayed, as well as the URL of the iframe.
Code
HTML: Select all
<script type="text/javascript">
<!--
function changeStuff(title,bio,vidurl,url)
{
document.getElementById('vidTitle').innerHTML=title;
document.getElementById('vidBio').innerHTML=bio;
document.getElementById('vidLink').href=url;
document.getElementById('vidFrame').src="BMVs/" + vidurl;
}
//-->
</script>

<!--Details, iFrame, and Direct Link-->
<div id="details">
<b>Title:</b> <span id="vidTitle">&quot;Keep Holding On&quot; by Avril Lavigne</span><br>
<b>Description:</b> <span id="vidBio">My 15th and, for the moment, last BMV, has a nice finale feel to it eh? Put more effort in syncing it this time.</span><br>
</div>
<div id="video">
<iframe id="vidFrame" name="vidFrame" src="BMVs/bmv15.html" frameborder=0 scrolling="no" width="400px" height="350px" marginheight="0px" marginwidth="0px"></iframe></div>
<b><a id="vidLink" href="http://pyramidia.webs.com/Flash/PyramidiaPlayer.swf?vidFile=BMV15.flv" onclick="window.open(this.href);return false;" style="text-decoration: none;">D<small>IRECT</small> L<small>INK</small></a></b>

<!--Nav Button Code-->
<a href="javascript:void();" onclick="changeStuff('&quot;Hero&quot; by AIK',
'My version of the one made on Bionicle.com, this is like what, version 6?',
'bmv01.html',
'http://pyramidia.webs.com/Flash/PyramidiaPlayer.swf?vidFile=BMV01.flv')">
<img src="VidThumbs/hero.jpg" title="&quot;Hero&quot; by AIK" alt="&quot;Hero&quot;" width=65 height=49></a>
It works perfectly, though my one problem is that when you hit back on the browser after watching a few videos, it goes back in the iframe's history before the main page's history.

So I need one of two solutions:

1) how to make the browser ignore the iframe's history (or something to avoid the above problem)

2) how to use JS to change the src of the object and the value in <param name="movie" value="">, which i've tried before but i'm not that addept in DOM.

Last edited by Zonglars; Jan 10th, 2008 at 13:31.
Reply With Quote

Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
opera, back button & javascript interval paza JavaScript Forum 4 May 23rd, 2008 21:19
submit() in iframe trouble ddprogrammer JavaScript Forum 3 Nov 5th, 2007 10:34
Navigate from MC-Button back to scene. Rick Flash & Multimedia Forum 1 Sep 24th, 2007 19:58
Back and Foward button working in FF but not IE AndrewFelix JavaScript Forum 2 Jul 23rd, 2007 01:47
Problem with Javascript Back Button in Firefox gorikain JavaScript Forum 4 Jun 25th, 2007 22:23


All times are GMT. The time now is 19:42.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43