PDA

View Full Version : Help with scrolling Iframe



synieth
05-15-2008, 01:40 PM
1) Script Title: not sure

2) Script URL (on DD): I can't find it.

3) Describe problem:

I got this code from the forums here, an adaption of one of the scrolling iframe codes. But I cannot find the actual page on DD. Anyway, I am having problems with the code. It works just fine on a test page (all by itself) but when I try to incorperate it into my site, it doesn't work. The iframe shows up, and the arrows appear in the right place, but they don't scroll. Any ideas? Heres the code:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Moonfish Studios // Artwork and Writing by Carrie Fowler</title>
</head>
<body
style="color: rgb(255, 255, 255); background-color: rgb(126, 129, 136);"
link="#9999ff" alink="#ffffff" vlink="#9999ff">
<center>
<table style="text-align: left; width: 1053px; height: 601px;"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td colspan="4" rowspan="1"><img
style="width: 1053px; height: 58px;" alt=""
src="http://moonfish-studios.com/images/syntop.jpg"></td>
</tr>
<tr>
<td colspan="1" rowspan="5"><img
style="width: 320px; height: 309px;" alt=""
src="http://moonfish-studios.com/images/synleft.jpg"></td>
<td><a href="biography.html"
onmouseover="if (document.images) document._biography.src= 'http://moonfish-studios.com/images/biography2.jpg';"
onmouseout="if (document.images) document._biography.src= 'http://moonfish-studios.com/images/biography1.jpg';"
target="main"><img
src="http://moonfish-studios.com/images/biography1.jpg"
name="_biography" border="0"></a></td>
<td colspan="1" rowspan="5">

<div style="position:relative;width:391px;height:309px;">
<iframe name="main" src="main.html" width="391" height="309" scrolling="no" frameborder="0"></iframe>

<div id="staticbuttons" style="position:absolute;bottom:0;right:0">
<a href="javascript:void(0);" onmouseover="myspeed=-thespeed" onmouseout="myspeed=0"><img
src="/images/arrows_up.gif" border="0"></a><br>
<a href="javascript:void(0);" onmouseover="myspeed=thespeed" onmouseout="myspeed=0"><img
src="/images/arrows_dn.gif" border="0"></a>
</div></div>
<script type="text/javascript">

//Iframe Scroller script - loosely adapted from:
//Page Scroller (aka custom scrollbar)- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//adapted by jscheuer1 in http://www.dynamicdrive.com/forums
//This credit MUST stay intact for use

var thespeed=3 //Enter scroll speed in integer (Advised: 1-3)

var myspeed=0 //Set for initial scrolling, if desired (ex:3), otherwise 0

/////////////////Stop Editing///////////////
function scrollwindow(){
bob.scrollBy(0,myspeed)
}

function initializeIT(){
if (myspeed!=0){
scrollwindow()
}
}

if (document.all||document.getElementById)
setInterval("initializeIT()",20)

</script>


</td>
<td colspan="1" rowspan="5"><img
style="width: 181px; height: 309px;" alt=""
src="http://moonfish-studios.com/images/synright.jpg"></td>
</tr>
<tr>
<td><a href="gallery.html"
onmouseover="if (document.images) document._gallery.src= 'http://moonfish-studios.com/images/gallery2.jpg';"
onmouseout="if (document.images) document._gallery.src= 'http://moonfish-studios.com/images/gallery1.jpg';"
target="main"><img
src="http://moonfish-studios.com/images/gallery1.jpg"
name="_gallery" border="0"></a></td>
</tr>
<tr>
<td><a href="library.html"
onmouseover="if (document.images) document._library.src= 'http://moonfish-studios.com/images/library2.jpg';"
onmouseout="if (document.images) document._library.src= 'http://moonfish-studios.com/images/library1.jpg';"
target="main"><img
src="http://moonfish-studios.com/images/library1.jpg"
name="_library" border="0"></a></td>
</tr>
<tr>
<td><a href="webdesign.html"
onmouseover="if (document.images) document._webdesign.src= 'http://moonfish-studios.com/images/webdesign2.jpg';"
onmouseout="if (document.images) document._webdesign.src= 'http://moonfish-studios.com/images/webdesign1.jpg';"
target="main"><img
src="http://moonfish-studios.com/images/webdesign1.jpg"
name="_webdesign" border="0"></a></td>
</tr>
<tr>
<td><a href="requests.html"
onmouseover="if (document.images) document._requests.src= 'http://moonfish-studios.com/images/requests2.jpg';"
onmouseout="if (document.images) document._requests.src= 'http://moonfish-studios.com/images/requests1.jpg';"
target="main"><img
src="http://moonfish-studios.com/images/requests1.jpg"
name="_requests" border="0"></a></td>
</tr>
<tr>
<td colspan="4" rowspan="1"><img
style="width: 1053px; height: 234px;" alt=""
src="http://moonfish-studios.com/images/synbottom.jpg"></td>
</tr>
</tbody>
</table>
<br>
</center>
</body>
</html>



If you want to actually see the page heres the url:
http://moonfish-studios.com/test2.html