Results 1 to 7 of 7

Thread: iframe problem

  1. #1
    Join Date
    Mar 2005
    Location
    Mumbai,INDIA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default iframe problem

    hi ,just see the code
    Code:
    <html>
    <head><title>MUTUAL FUNDS</title>
    </head>
    <body>
    <table><td BGCOLOR=RED>HDFC CAPITAL BUILDER--DIVIDEND</TD></TABLE>
    <IFRAME SRC="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=HDFC%20Capital%20Builder%20(D)&ff_desc=HDFC%20Asset%20Management%20Co.%20Ltd.&im_id=MZU018&im_ffid=HD" width="100%" height="50%">
    <BR><BR>
    <HR>
    <table><td BGCOLOR=RED>HDFC CAPITAL BUILDER--GROWTH</TD></TABLE>
    <iframe src="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=HDFC%20Capital%20Builder%20(G)&ff_desc=HDFC%20Asset%20Management%20Co.%20Ltd.&im_id=MZU016&im_ffid=HD" WIDTH="100%" HEIGHT="50%">
    <br><br>
    
    <table><td BGCOLOR=RED>UTI MASTER SHARE--DIVIDEND</TD></TABLE>
    <iframe src="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=UTI%20Mastershare%20(D)&ff_desc=UTI%20Asset%20Mgmt%20Company%20Pvt.%20Ltd.&im_id=MUT094&im_ffid=UT" WIDTH="100%" HEIGHT="50%">
    <BR><BR>
    
    <table><td BGCOLOR=RED>TATA DIVIDEND YEILD FUND--DIVIDEND</TD></TABLE>
    <iframe src="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=Tata%20Dividend%20Yield%20Fund%20(D)&ff_desc=Tata%20Asset%20Management%20Limited&im_id=MTA130&im_ffid=TA" WIDTH="100%" HEIGHT="50%">
    <BR><BR>
    
    <TABLE><TD BGCOLOR=RED>TATA DIVIDEND YEILD FND--GROWTH</TD><TABLE>
    <IFRAME SRC="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=Tata%20Dividend%20Yield%20Fund%20(G)&ff_desc=Tata%20Asset%20Management%20Limited&im_id=MTA129&im_ffid=TA" WIDTH="100%" HEIGHT="50%">
    
    </body></html>
    my problem is that i want a heading<td> before every iframe .but in my explorer it's showing only the first one.Also do tell me why my <br> tags ignored.I am very new with iframes.thanks.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The iframe tag needs to be closed. In IE it needs a closing tag:

    <iframe attributes here></iframe>

    Tables should have rows defined and you were missing a closing tag for the last table. Attributes and tags are better rendered in lower case, attributes should be quoted. Using 50% for each iframe's height makes no sense, 100% for each width is not required unless your screen is less than 1024 pixels wide.

    Empty <br>'s often do nothing or little and are not needed in a case like this if styling is used.

    The main problem was no closing tags on the iframes. The rest of the changes are mostly just good habits that tend to produce crisp, easy to maintain markup. The tables should really be spans.

    This works fairly well here:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title>MUTUAL FUNDS</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    span {
    background-color:red;
    color:white;
    padding:0 5px;
    }
    iframe, hr {
    display:block;
    margin-bottom:30px;
    }
    iframe {
    width:90%;
    height:500px;
    }
    </style>
    </head>
    <body>
    <span>HDFC CAPITAL BUILDER--DIVIDEND</span>
    <iframe SRC="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=HDFC%20Capital%20Builder%20(D)&ff_desc=HDFC%20Asset%20Management%20Co.%20Ltd.&im_id=MZU018&im_ffid=HD">
    </iframe><hr>
    
    <span>HDFC CAPITAL BUILDER--GROWTH</span>
    <iframe src="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=HDFC%20Capital%20Builder%20(G)&ff_desc=HDFC%20Asset%20Management%20Co.%20Ltd.&im_id=MZU016&im_ffid=HD">
    </iframe><hr>
    
    <span>UTI MASTER SHARE--DIVIDEND</span>
    <iframe src="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=UTI%20Mastershare%20(D)&ff_desc=UTI%20Asset%20Mgmt%20Company%20Pvt.%20Ltd.&im_id=MUT094&im_ffid=UT">
    </iframe><hr>
    
    <span>TATA DIVIDEND YEILD FUND--DIVIDEND</span>
    <iframe src="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=Tata%20Dividend%20Yield%20Fund%20(D)&ff_desc=Tata%20Asset%20Management%20Limited&im_id=MTA130&im_ffid=TA">
    </iframe><hr>
    
    <span>TATA DIVIDEND YEILD FND--GROWTH</span>
    <iframe SRC="http://messageboard.moneycontrol.com/mf/mfinfo/snap.php?im_desc=Tata%20Dividend%20Yield%20Fund%20(G)&ff_desc=Tata%20Asset%20Management%20Limited&im_id=MTA129&im_ffid=TA">
    </iframe><hr>
    
    </body></html>
    Last edited by jscheuer1; 11-20-2005 at 03:59 AM. Reason: add line break for clarity
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Mar 2005
    Location
    Mumbai,INDIA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Your modified page is not working.I wanted the titles in <td> form,look at the page below:
    http://www.angelfire.com/empire2/funnyland/mf.html

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by sunny
    Your modified page is not working.I wanted the titles in <td> form,look at the page below:
    http://www.angelfire.com/empire2/funnyland/mf.html
    My version works here in FF, Opera and IE. I will double check its code, as posted, have a look at your link and get back to you.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That demo page I posted is a stand-alone html page and tested out here just fine, again (I was just being extra sure). Your online demo is a Frankenpage, with so much code on it, it doesn't know which end is up. Try my code as written. In a text editor, open a blank (new) file and paste my code into it, save it as test.htm, run it locally in your browser.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  6. #6
    Join Date
    Mar 2005
    Location
    Mumbai,INDIA
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    A last general Question -Does it make any difference in the output if we have comments(a lot as i had) in the page.Does it changes the interpretation of the browser .And thanks a lot.See You in Javascript Section With the same Code But Different Problem.

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Comments properly inserted into code are ignored by the browser. It can sometimes happen that spacing around comments gets interpreted as additional spaces in the markup though, if you are not careful. Any poorly placed (like in the middle of the attributes section of a tag) or improperly delimited comments, are just asking for trouble.

    One place where comments can cause big problems, even when they are properly constructed, is in regards to scripts that rely upon a set document structure for the DOM. Generally that is the fault of the script writer though, allowance should be made for possible comment insertion when 'walking the document tree' as this type of scripting is known. Still there are many scripts out there that do this and do not take it into account.
    Last edited by jscheuer1; 11-27-2005 at 10:47 AM. Reason: add info
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •