View Full Version : IFRAME scroller IE: use inside table
FatCactus
09-14-2004, 09:13 AM
I'm a complete novice ... so apologies if this is a dumb question.
I've been trying out the IFRAME scroller IE
http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm
and it works fine ... except when I try to insert the script into the cell of a table. When I view the page I just see the actual script commands and no scrolling text. I'd be very grateful if someone would tell me where I'm going wrong.
Thanks ...
ddadmin
09-15-2004, 08:37 PM
It shouldn't matter whether the script is inside a table cell or not. Do you have a URL to the problem?
FatCactus
09-16-2004, 09:38 AM
The links are:
Works - not inside table
http://www.liv.ac.uk/~jan/Test.htm
and
Doesn't work - inside table
http://www.liv.ac.uk/~jan/Test2.htm
Thanks for any help ...
cr3ative
09-16-2004, 01:26 PM
I viewed the source of the tabled site, this is what it says:
<table width="75%" border="1">
<tr>
<td><script type="text/javascript">
<p>/***********************************************<br>
* IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)<br>
* This notice MUST stay intact for legal use<br>
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source
code<br>
***********************************************/</p>
<p>//specify path to your external page:<br>
var iframesrc="external.htm"</p>
<p>//You may change most attributes of iframe tag below, such as width and
height:<br>
document.write('<iframe id="datamain" src="'+iframesrc+'"
width="150px" height="150px" marginwidth="0"
marginheight="0" hspace="0" vspace="0" frameborder="1"
scrolling="no"></iframe>')</p>
<p></script></p>
</td>
</tr>
</table>
As you can see, you've accidentally pasted the code as text into your HTML composing program, and it has treated it as such. It's a simple mistake to make. You need to make your HTML code this:
<table width="75%" border="1">
<tr>
<td>
<script type="text/javascript">
/***********************************************
* IFRAME Scroller script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
//specify path to your external page:
var iframesrc="external.htm"
//You may change most attributes of iframe tag below, such as width and height:
document.write('<iframe id="datamain" src="'+iframesrc+'" width="150px" height="150px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"></iframe>')
</td>
</tr>
</table>
</script>
Regards
cr3ative
Powered by vBulletin® Version 4.2.2 Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.