Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alternative to iframe

Status
Not open for further replies.

PKSIT

IS-IT--Management
Sep 1, 2006
25
US
I am developing a news page with different rss feeds and outside applets loading in. I have one applet coming in from yahoo finance that displays stock information. The code that they give adds it using iframes.

The iframe is doing strange things in IE sometimes it displays the full width and other times it displays about 60% of its width. I have it inside a table to act as two colums because there is other stuff above it and to the right of it. It works fine in FF but in IE about 75% it displays too thin and other times it displays normally.

Can anyone help me with having it load in java script or as an applet or some other way. Here is the code for the yahoo applet.

Code:
<iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="[URL unfurl="true"]http://api.finance.yahoo.com/instrument/1.0/GOOG,XOM,GE,AAPL,C,[/URL]
BAC,LMT,MSFT,VZ,IBM/badge;quote/HTML?AppID=Hr3JrVsg2nBX5FReSlbroi4daHQ-
&sig=PmEkPRA3EXNJwEwMN1.CmSAC0aE-&t=1169662370418" width="300px" height="629px"><a href="[URL unfurl="true"]http://finance.yahoo.com">Yahoo![/URL] Finance</a>
<br/><a href="[URL unfurl="true"]http://finance.yahoo.com/q?s=GOOG">Quote[/URL] for GOOG</a></iframe>

When it is by itself in a html document it works fine in IE. Maybe i could have it load in using SSI. But let me know if anyone else has any ideas.

Thanks in advance,

Joe
 
I don't like iframes, but perhaps if you predefine the size of the iframe with some CSS such as

inline:
Code:
style="width:300px; height:649px"
(20 extra pixels for the anchor tag underneath)
It may work in IE, I've not tested this, but it seems plausible.
 
I gave it a shot but it didn't fix it.
 
How are you defining the widths of the table column(s) and the remaining columns of the table?

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
the table is 100% width. the td is 300px there is one other applet above the yahoo thing and it is 300px wide (same as the yahoo thing) the other td is just the rest of the window.
 
Oddly I've put extra content in a test page with your iframe and after about 30 refreshes, only about 3 times did it initially show up not at full width, which after about a half second shows up at full width.

It appears like you have a 3 column table in the iframe info and the 3rd column over is the one that doesn't show up initially at times.

Maybe forcing a width on the third column may keep this from happening, but I'm not totally sure cause I don't know the exact setup of your table.

<.
 
The Yahoo applet is not my code I got it from yahoo finance when I created what quotes to put in it. That is why i don't really have any control over this thing. I would like to have some other way to call the source so i don't have to use the iframe that they give.
 
I've been testing that same yahoo finance function for several days in a table free page and not run into any problems yet.

Try adjusting the width of the table to 95% (or something less than 100) and see if that makes any difference in IE.


Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
PKSIT can't control anything about the table, it's given to him from Yahoo.

<.
 
it didn't work traingamer.

does anyone know if i could pull it out of the iframe and have it called by an applet tag or by java script
 
Sorry to say, I don't think you can put this item in anything other than an iframe for css reasons.

If you notice, there are 2 anchors within the iframe:
Code:
<a href="[URL unfurl="true"]http://finance.yahoo.com">Yahoo![/URL] Finance</a>
<br/>
<a href="[URL unfurl="true"]http://finance.yahoo.com/q?s=GOOG">Quote[/URL] for GOOG</a>
These anchors are styled within the code for the applet, and to try to put the applet (which isn't a true applet, only an HTML file that shows an applet) in an <object> tag or such will make them display very incorrectly.

This is all the case if you want that applet embedded in your page.

However with Javascript, you can open up a new window and paste that applet in.


<.
 
This works consisistently for me in IE6.
Code:
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td><p>
test test</p></td>
<td><p>
blah</p></td>
<td><p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin ullamcorper. Pellentesque congue ante commodo nisi. Pellentesque a augue. Donec faucibus turpis vel libero interdum bibendum. Phasellus est nisi, nonummy vitae, feugiat in, lobortis ac, dolor. In pharetra accumsan sapien. Maecenas vel sapien at leo pharetra varius. Proin convallis lectus vitae lectus. Integer eu nunc quis turpis blandit varius. Praesent sit amet nisl quis mi tincidunt eleifend.
</p></td>
</tr>
<tr>
<td colspan=2 width="300">
<!-- Start of Yahoo! Finance code -->
<iframe allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="[URL unfurl="true"]http://api.finance.yahoo.com/instrument/1.0/GOOG,XOM,GE,AAPL,C,BAC,LMT,MSFT,VZ,IBM/badge;quote/HTML?AppID=Hr3JrVsg2nBX5FReSlbroi4daHQ-&sig=PmEkPRA3EXNJwEwMN1.CmSAC0aE-&t=1169662370418"[/URL] width="300px" height="629px"><a href="[URL unfurl="true"]http://finance.yahoo.com">Yahoo![/URL] Finance</a><br/><a href="[URL unfurl="true"]http://finance.yahoo.com/q?s=GOOG">Quote[/URL] for GOOG</a></iframe><!-- End of Yahoo! Finance code -->
</td>
<td>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Proin ullamcorper. Pellentesque congue ante commodo nisi. Pellentesque a augue. Donec faucibus turpis vel libero interdum bibendum. Phasellus est nisi, nonummy vitae, feugiat in, lobortis ac, dolor. In pharetra accumsan sapien. Maecenas vel sapien at leo pharetra varius. Proin convallis lectus vitae lectus. Integer eu nunc quis turpis blandit varius. Praesent sit amet nisl quis mi tincidunt eleifend.
</p>
<p>
Proin aliquet neque eu nisl. Aliquam sapien lectus, vehicula euismod, volutpat vitae, laoreet sed, enim. Aliquam eu mi id lorem tempor fermentum. Vestibulum elit turpis, ultrices et, vehicula sed, auctor vitae, dui. Suspendisse eu velit. Suspendisse tincidunt, risus id aliquet consectetuer, massa magna pharetra lorem, vel convallis sapien ante eget nulla. Quisque porta porta leo. Mauris purus metus, facilisis id, sollicitudin vestibulum, porta vitae, lacus. Aliquam eu velit. Vestibulum imperdiet lorem a magna. Nam eu mi. Proin molestie lacus sed elit. Etiam nulla erat, ornare nec, pellentesque et, placerat malesuada, neque. Donec est nulla, nonummy vitae, rutrum nec, euismod vitae, mauris.
</p>
<p>
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. In id ligula. Aliquam consectetuer dignissim eros. Quisque hendrerit. Vivamus at elit. Donec ullamcorper. Nam sapien massa, hendrerit eget, adipiscing sed, ultrices eget, diam. Donec erat felis, placerat eu, varius posuere, adipiscing ac, mauris. Ut convallis. Vivamus eu velit ut pede auctor ullamcorper. In posuere justo sit amet purus. Aenean gravida ornare risus. Etiam vulputate lacinia neque. Quisque luctus consectetuer nunc.
</p>
<p>
Sed lacus. Donec eget sem. Aenean vestibulum diam eu tortor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Aliquam iaculis magna vitae pede. Donec eleifend varius sem. Nam viverra fringilla ipsum. Curabitur ornare erat sed tortor. Sed placerat fermentum augue. Donec mi massa, accumsan id, cursus quis, laoreet sed, augue. Maecenas lectus. Etiam orci. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Fusce egestas. Mauris ligula. Nam ac nunc. Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
</p>
<p>
Aliquam erat volutpat. In magna nisl, consequat vel, egestas in, lacinia non, nibh. Mauris risus dolor, elementum ut, faucibus at, nonummy vel, ante. Maecenas a nibh. Nullam felis ipsum, convallis quis, pharetra eget, euismod et, justo. Fusce malesuada commodo tellus. Quisque orci tellus, ullamcorper sit amet, semper sed, dapibus vel, lorem. Vivamus sapien. In ultrices. Morbi tellus. Ut sapien. Etiam sem dolor, viverra a, cursus vitae, porta eget, quam.
</p>
<p>
Quisque euismod, lorem eget sollicitudin pellentesque, lacus mauris dapibus turpis, a placerat quam risus in est. Mauris purus justo, ullamcorper eget, dapibus eu, dignissim eget, orci. Donec quis mi. Integer lacus. Nunc dolor erat, eleifend ut, tristique quis, cursus quis, diam. Ut gravida, lorem non molestie sodales, libero ipsum commodo quam, id consectetuer mauris justo elementum quam. Praesent bibendum, diam nec pharetra tincidunt, ante est fermentum erat, nec mollis velit sapien nec nibh. Donec tempor, dui a blandit pulvinar, nisl velit ullamcorper quam, non posuere tellus massa nec pede. Nunc suscipit ullamcorper arcu. Proin bibendum. Nam nulla tellus, feugiat ac, posuere molestie, pulvinar vel, arcu. Quisque tortor diam, semper at, vestibulum vitae, adipiscing nec, nisi. Aenean porta, magna quis ultricies scelerisque, lectus diam euismod lacus, quis placerat libero lorem quis massa. Vivamus suscipit luctus purus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean pellentesque ligula sit amet orci. Sed dictum euismod lacus. Quisque tempus elit suscipit nisi. Nullam malesuada bibendum arcu. Proin erat ipsum, vulputate eu, aliquet dignissim, eleifend sed, urna.
</p>
<p>
Proin venenatis. Nam quis mi. Sed lacus ipsum, molestie in, condimentum vel, rutrum sed, tellus. Donec ultrices est fermentum arcu. Vestibulum convallis. Ut et nibh at lorem rutrum placerat. Etiam eget neque. Suspendisse potenti. Vivamus commodo. Nullam mauris metus, posuere in, rhoncus eu, aliquet sit amet, sem. Nullam ante. Sed ac sapien ut justo bibendum luctus. Maecenas dictum magna sit amet ligula. Sed vehicula viverra est. Donec quis turpis vitae turpis porta ultricies. Vestibulum bibendum adipiscing justo.
</p>
<p>
Nulla justo neque, interdum a, eleifend aliquet, consectetuer sed, mi. Proin sit amet diam. Quisque enim eros, congue tempor, tempus eu, tincidunt nec, tellus. Curabitur id erat. Praesent at turpis. Ut pellentesque. Ut at sapien. Vivamus pharetra. Maecenas vestibulum. Praesent est justo, iaculis et, auctor non, dictum non, nisl. Phasellus rutrum lorem at massa. In sodales sem accumsan urna.
</p>
</td>
</tr>
</table>

Greg
"Personally, I am always ready to learn, although I do not always like being taught." - Winston Churchill
 
Yeah to be honest, I've not once had it stick on me with a small width.

<.
 
this is why i had iframes and using code that isn't mine. anybody know why sometimes it works in IE and other times not. if you keep hitting refresh sometimes its good and other times its too thin. works fine in FF though.

Here is the left side of the column. And i know that i left out the /tr and /table.

Again the applet above it is not my code is from an outside source.

Code:
<table width="100%" border="0">
<tr>
<td width="300px" valign="top">
	<!-- Start of Barchart Indices -->
	<APPLET NAME="QuotePage"
            CODE="QuotePage.class"
            CODEBASE="[URL unfurl="true"]http://java.barchart.com/quotepage/"[/URL]
            HEIGHT="140px" WIDTH="300px">    
    <PARAM NAME="symbols" VALUE="'Indices,$NYS:NYSE Comp,$NASX:Nasd Comp,$IUX:Russell,$CRB:CRB Index,$DXY:Dollar Index,$MMX:Major Market,$IUXX:Nasdaq 100">
    <PARAM NAME=" VALUE=" bgcolor" FFFFFF">
    <PARAM NAME="fgcolor" VALUE="000000">
    <PARAM NAME="pscolor" VALUE="005500">
    <PARAM NAME="ngcolor" VALUE="AA0000">
    <PARAM NAME="numcols" VALUE="1">
    <PARAM NAME="numrows" VALUE="8">
    <PARAM NAME="crorder" VALUE="down">
    <PARAM NAME="data"    VALUE="price, percent, Change">
    <PARAM NAME="display" VALUE="fractions">
    <PARAM NAME="fface"   VALUE="Courier">
    <PARAM NAME="fsize"   VALUE="12">
    <PARAM NAME="fstyle"  VALUE="Normal">
	<PARAM NAME="wmode"	  VALUE="opaque">
    </APPLET>
	<!-- End of Barchart Indices -->
	<p class="disclosure">Quotes are delayed 20 minutes.<br>Please refresh the page to update.</p>
	<!-- Start of Yahoo Quotes -->
	<iframe style="width:300px; height:629px" allowtransparency="true" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no" src="[URL unfurl="true"]http://api.finance.yahoo.com/instrument/1.0/GOOG,XOM,GE,AAPL,C,BAC,LMT,MSFT,VZ,IBM/badge;quote/HTML?AppID=Hr3JrVsg2nBX5FReSlbroi4daHQ-&sig=PmEkPRA3EXNJwEwMN1.CmSAC0aE-&t=1169662370418"[/URL] width="300px" height="629px"><a href="[URL unfurl="true"]http://finance.yahoo.com">Yahoo![/URL] Finance</a><br/><a href="[URL unfurl="true"]http://finance.yahoo.com/q?s=GOOG">Quote[/URL] for GOOG</a></iframe>
	<!-- End of Yahoo Quotes -->
</td>



Thanks for the help guys
 
sorry ...

i meant to say "this is why i HATE iframes and using code that isn't mine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top