Solved

Creating IFrames

Posted on 2000-03-07
4
850 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…

695 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