Solved

Creating IFrames

Posted on 2000-03-07
4
845 Views
Last Modified: 2008-03-10
Hi,
I want to create IFrames at runtime.
I used document.write("<IFrame ...></IFrame>").
It worked fine. Each IFrames has set of links and caption. So,I've to create 2 rows for each IFrame.What is the best way to do this?.
One way is creating a table inside each IFrame and the other way is create two <Div> tags .One for the caption and other for the links.These 2 div tags should be inside the IFrame.

Is there any other way to do this?.
I'm creating the IFrame at runtime.
Any ideas/suggestions can be very useful for me.
Thanks in advance.
0
Comment
Question by:tmmet
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
remibrom earned 50 total points
ID: 2594811
I would suggest coding the tables for each IFRAME in an external file and then having the IFRAME link to the file -- thus, you would have <IFRAME SRC="stuff.html">
This approach would make updating the links easy, as you would only have to edit the external file, you would leave the IFRAME alone.  This may not work if you create the links and IFRAME contents at run-time, though.  If you do that, I suggest using the DIVs, because they are easy and work well with IFRAMEs -- unless you want borders for each "cell", in which case a table is the obvious choice.
0
 

Author Comment

by:tmmet
ID: 2596590
Hi,
Thanks for our reply.how can I embed 2 DIV tags inside my IFrame?.I tried using document.all.myIFrame.innerHTML = ....
Its giving error.Any ideas/suggestions will be greatly helpful for me.Thanks in advance.
0
 

Author Comment

by:tmmet
ID: 2596597
Hi,
Thanks for our reply.how can I embed 2 DIV tags inside my IFrame?.I tried using document.all.myIFrame.innerHTML = ....
Its giving error.Any ideas/suggestions will be greatly helpful for me.Thanks in advance.
0
 

Expert Comment

by:remibrom
ID: 2599215
Ah, so you ARE embedding at run time.  To change HTML (including DIVs) at runtime, check at http://msdn.microsoft.com/msdn-online/workshop/author/dhtml/reference/properties/innerHTML.asp
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question