Jump to content

Iframe Code Is Acting-up In Html Page


amitamberker

Recommended Posts

Hi,I have placed the "<iframe></iframe>" in 01.html and 02.html pages. Upon clicking the links, the page is not displaying properly.Could you please help? The required details are as follows:common_links.html

<body style="margin-top:0px"><table style="width: 800px" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center" class="style1"> <a href="01.html" class="style2">Page ONE</a>    |     <a href="02.html" class="style2">Page TWO</a> </td> </tr></table></body>
01.html
<body style="margin-top:0px"><table style="width: 800px" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center">Computer - ZERO ONE</td> </tr> <tr> <td> </td> </tr> <tr> <td> <iframe src="common_links.html" width="800" height="100" style="float: center" marginwidth="1" marginheight="1" title="I F Bar" scrolling="no" border="0" frameborder="0">~ Does NOT Support ~</iframe> </td> </tr></table></body>
02.html
<body style="margin-top:0px"><table style="width: 800px" cellspacing="0" cellpadding="0" align="center"> <tr> <td align="center">Laptop - ZERO TWO</td> </tr> <tr> <td> </td> </tr> <tr> <td> <iframe src="common_links.html" width="800" height="100" style="float: center" marginwidth="1" marginheight="1" title="I F Bar" scrolling="no" border="0" frameborder="0">~ Does NOT Support ~</iframe> </td> </tr></table></body>
stylesheet.css
.style1 { background-color: #800000; height: 100px; }.style2 { font-family: Verdana; color: #FFFFFF; font-size: 12pt; font-weight: bold; text-decoration: none;}
Link to comment
Share on other sites

Newbie,Seems to display fine when I tested it. Would help to know what you are trying to accomplish and what your expectations are in terms of what is to be displayed. Please provide more information.Thanks,BillM

Link to comment
Share on other sites

Seems to display fine when I tested it. Would help to know what you are trying to accomplish and what your expectations are in terms of what is to be displayed. Please provide more information.
Hi BillM,Thanks for your response.Could you get into my Screen via Remote Access? Like I said, upon hitting the links, the page is not displaying properly. I mean, upon hitting on the “Page ONE | Page TWO”, the page is not displaying properly.
Link to comment
Share on other sites

I created 3 pages with the same names and same content as you posted, aside from the internal style sheet. With what you posted, I could only see the following, until I started clicking links:Page ONE | Page TWO That is, at least until I started clicking the links, alternating between the two. Then I ultimately got down to the following:Computer - ZERO ONE Laptop - ZERO TWOComputer - ZERO ONELaptop - ZERO TWOThen, there were no more links. I guess the big question here is: Why you are trying to do this in an iframe? Granted, we don't know if there is/will be additional content other than what you have included in your presented code. From what you have shown us, you would do better to either:A. Put the shared content you have shown in common_links.html on both pages, using parent as the targetB. Use the common_links.html as an include file (kind of overkill considering the simplicity of the code)C. Use a split frames page to present the content, showing the links at the top, bottom, or wherever you preferD. In your links, you don't have a target. If you include target="parent", the resulting link takes over the whole page. I believe this is what you were looking for to happen.Changing the code on the recreated sample and using option D, I got it to work the way I think you intended. Try changing your two links in the common_links.html page to the following:<a href="01.html" target="_parent" class="style2">Page ONE</a>    |    <a href="02.html" target="_parent" class="style2">Page TWO</a>I think you will find that this works. Good luck. BillM

Link to comment
Share on other sites

Hi BillM!!!...Heyy... The option D. worked for me. As per your comments, I changed the two links in the "common_links.html" page to the following:<a href="01.html" target="_parent" class="style2">Page ONE</a>    |    <a href="02.html" target="_parent" class="style2">Page TWO</a>and this is what I was looking for to happen. Thanks a lot BillM!But however - Could you get into my Screen via Remote Access? Please let me know what you think... By the way I could not understand the option A. option B. and option C. but no worries since the issue is resolved.Again THANKS A BUNCH BillM.

Link to comment
Share on other sites

All the remote tools I have only work within my domain. So, no, I don't think I can. As to the other options, using includes files is in the ASP tutorial. Considering that you are using html instead of asp, I don't think the include file would have worked for you. Using frames really isn't anywhere in this site, but a frames page allows you to make one or more frame in the window static, meaning for example, that if you wanted to, you could have made your common_files.html page your top frame and just made the name for your bottom frame the target and displayed the page there. It doesn't matter since the option I gave you worked, but might be things you want to look up for future reference and improving your skills. The thing to remember about using frames in general, including iframes, is that there are security vulnerabilities that make their use undesirable if used in anything other than an intranet site, where security to the site is tightly controlled. Glad I could help and best of luck to you.Bill

Link to comment
Share on other sites

Hi Bill,

All the remote tools I have only work within my domain. So, no, I don't think I can.
No Worries! I can suggest a tool from which you could easily enter into my Screen. Please let me know what you think.
As to the other options, using includes files is in the ASP tutorial. Considering that you are using html instead of asp, I don't think the include file would have worked for you.
YES - I am using ".html" pages. However - Could you please send me your Email ID? Would like to send you the actual link.
Using frames really isn't anywhere in this site, but a frames page allows you to make one or more frame in the window static, meaning for example, that if you wanted to, you could have made your common_files.html page your top frame and just made the name for your bottom frame the target and displayed the page there.
Could not understand you. But no worries! Not a big deal.
It doesn't matter since the option I gave you worked, but might be things you want to look up for future reference and improving your skills.
Maybe perhaps you can show me a Demo on my Screen.
The thing to remember about using frames in general, including iframes, is that there are security vulnerabilities that make their use undesirable if used in anything other than an intranet site, where security to the site is tightly controlled.
Again could not understand you what that means. But no worries! Not a big deal.
Glad I could help and best of luck to you.
YUP! Thanks a lot Bill.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...