473,549 Members | 2,560 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

using an html link to dynamically change content in iFrame

I feel like this should be fairly easy but I have been struggling with
this for sometime. I have not been able to find someone who's had the
same problem as mine yet.

http://g.bach.home.insightbb.com/movies.html

I have a page set up on my website to view videos from various sites
by creating html pages and creating links to view them inside an
iframe. I'm getting tired of creating pages for every video that I
find and it seems to make more sense to create javascript coding that
will store the "video code" and generate a dynamic HTML page with that
code inside of the iframe.

I figured I could pass a variable (movieName) from the link to a
function and then use either an IF/THEN statement or an ARRAY to load
the code. Then open the iframe...write the HTML code + moviecode +
HTML code... and then close.

Any help would be greatly appreciated!

Mar 17 '07 #1
3 4971
synergy_711 wrote :
I feel like this should be fairly easy but I have been struggling with
this for sometime. I have not been able to find someone who's had the
same problem as mine yet.

http://g.bach.home.insightbb.com/movies.html
Your webpage has lots of other issues and problems:

- use a doctype declaration, preferably a strict DTD
- validate your markup code
- avoid using document.write( ) when there is no need to do this; your
wepbage should work (content accessible and webpage navigable) without
resorting to javascript support
I have a page set up on my website to view videos from various sites
by creating html pages and creating links to view them inside an
iframe. I'm getting tired of creating pages for every video that I
find and it seems to make more sense to create javascript coding that
will store the "video code" and generate a dynamic HTML page with that
code inside of the iframe.
The solution you look for is less accessible and more
technology-dependent. If you still want to pursue that choice, then
you'll have to use valid markup code to begin with.

FWIW, the loading of video inside the iframe worked for me; using
Firefox 2.0.0.2 here.

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)
http://developer.mozilla.org/en/docs...your_Web_Pages
Mar 17 '07 #2
>
Your webpage has lots of other issues and problems:

- use a doctype declaration, preferably a strict DTD
- validate your markup code
- avoid using document.write( ) when there is no need to do this; your
wepbage should work (content accessible and webpage navigable) without
resorting to javascript support
I have a page set up on my website to view videos from various sites
by creating html pages and creating links to view them inside an
iframe. I'm getting tired of creating pages for every video that I
find and it seems to make more sense to create javascript coding that
will store the "video code" and generate a dynamic HTML page with that
code inside of the iframe.

The solution you look for is less accessible and more
technology-dependent. If you still want to pursue that choice, then
you'll have to use valid markup code to begin with.

FWIW, the loading of video inside the iframe worked for me; using
Firefox 2.0.0.2 here.

Gérard
--
Using Web Standards in your Web Pages (Updated Dec. 2006)http://developer..mozilla.org/en/doc...s_in_your_Web_...
-----------------------------------------------------------------------------------------------------
Ok..yes..I agree I need to clean things up. :-)
FWIW, the loading of video inside the iframe worked for me; using
Firefox 2.0.0.2 here.
The current method works..but it is cumbersome. That's why I'm looking
for a new method.

I created another lil page (http://g.bach.home.insightbb.com/
betamovie.html) that may help you out a little bit more of where I'm
trying to go with this.

Mar 17 '07 #3
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://
www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<title>Beta Movie Page</title>
<!-- Start Array for movie info (to be moved to js file later) -->
<script language="javas cript">
function loadMovies() {
var movieInventory = new Array();

movieInventory[0] = "<param name='movie' value='http://www.youtube.com/
v/tZZv5Z2Iz_s'></param><param name='wmode' value='transpar ent'></
param><embed src='http://www.youtube.com/v/tZZv5Z2Iz_s'
type='applicati on/x-shockwave-flash' wmode='transpar ent' width='425'
height='350'></embed>";

movieInventory[1] = "<param name='movie' value='http://www.youtube.com/
v/tZZv5Z2Iz_s'></param><param name='wmode' value='transpar ent'></
param><embed src='http://www.youtube.com/v/tZZv5Z2Iz_s'
type='applicati on/x-shockwave-flash' wmode='transpar ent' width='425'
height='350'></embed>";

}
</script>

<!-- End Array for movie info (to be moved to js file later) -->
<!-- Start code to generate page within iframe -->
<script language="javas cript">
function changeMovie(mov ieName) {
var temp = movieName;
window.frames[0].innerHTML = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML
4.01 Transitional//EN''http://www.w3.org/TR/html4/
loose.dtd'><htm l><head><meta http-equiv='Content-Type' content='text/
html; charset=ISO-8859-1'><title>Now Showing</title><style type='text/
css'body {background-color: #000000; margin-left: 0px; margin-top:
0px; margin-right: 0px; margin-bottom: 0px;}</style></
head><body><tab le width='720' border='0' cellspacing='0'
cellpadding='0' ><tr><td align='center' valign='middle'
height='480'><o bject width='425' height='350'>}" +
movieInventory[temp] + "</object></td></tr></table></body></html>"

}

</script>

<!-- End code to generate page within iframe -->
<body onLoad="loadMov ies()">
<!-- Start Movie Screen -->
<table align="center">
<td>
<iframe src="moviesplas h.html" id="screen" name="screen" width="720"
height="480" scrolling="no" frameborder="0" ></iframe>
</td>
</table>

<!-- End Movie Screen -->
<br>
<!-- Start Links -->
<table align="center">
<td>
<img src="images/games/accent.gif" alt="accent graphic"<a href=""
onClick="change Movie(0)">Voltr on: Formation</a><br>
<img src="images/games/accent.gif" alt="accent graphic"<a href=""
onClick="change Movie(1)">Voltr on: Intro</a<br>
</td>

</table>
<!-- End Links -->
</body>
</html>
or i could just post the code...

Mar 17 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
3497
by: Simon Harvey | last post by:
Whato chaps, I work (or am hoping to work! :) for a company that specialises in the following: - Localisation of media - including software, manuals, literature and training material. - Creating training material themselves in many langauges built to order. The main thing I'm thinking about for the company is maybe a sort of content
1
7585
by: Dany P. Wu | last post by:
Hi everyone, I've finally figured out what I actually want to do with my website, let's hope this time I can explain it better. The opening page of the website has a bunch of links that look somewhat like: <a href="geninfo.html?sub_contact.html">
2
1835
by: google | last post by:
I have a HTML file that contains an iframe. The HTML file is served by one server. The iframe contains a link to a completely different server. My question is, can any action in the iframe (such as a form submit) cause the look and feel of the containing HTML to change, such as I want some table elements in the parent (that contains the...
1
2066
by: Amir Eshterayeh | last post by:
Dear Friends I need to change the css file of my aspx files dynamically so users can choose their css file names and when page loads, it read css file name from database. I try to use response.write to write this way: Dim i As Integer = 1 If i = 1 Then Response.Write("<LINK href=""Stylesone.css"" type=""text/css"" rel=""stylesheet"">")...
4
2345
by: Mark | last post by:
I am rephrasing a question from yesterday. I have a page with several user controls : nav, header, and footer currently. What I would like to do is add a new control ('content') and use it like a frame. Specifically like a "content" or "main" frame. Can I somehow load the content of another, complete html or aspx page into this control?...
2
7456
by: bj | last post by:
Hi, Yes, this is yet another "switching from tables to divs for layout purposes" post. I have been searching for the past few hours to find what I'm looking for as I hate posting unnecessarily. I am a pretty crap searcher but I'm kinda sure this hasn't been written about yet. Please feel free to prove me wrong and link to a solution....
3
1790
by: jobs at webdos | last post by:
I have a bunch of html pages and a database table with links to them. I want to dynamically display those pages inside a set location on an exsisting asp.net 2.0 page when a link is selected, but I don't want to change the html pages which will contain a duplicate set of <html> tags. What's the best way to implement this? WebParts? Does...
0
1603
by: pbd22 | last post by:
Hi. I am having a really tough time here and would appreciate some help. i am using an iFrame to pass a url string of files to upload to server. on the client i have created a multiple upload javascript using the below link: http://the-stickman.com/web-development/javascript/upload-multiple-files-with-a-single-file-element/
3
4887
by: klaus654 | last post by:
I have posted this also in the XML forum, as the code below actually came from an XML doc, but I think it's a basic HTML issue: Original post I am an IT consultant, but I work entirely on the hardware and networking side of things. I don't work with much (any) code. So most of what you guys do within this forum may as well be in Chinese. But...
0
7526
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7457
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7723
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7483
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6051
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3504
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1063
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
771
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.