Iframe - Unlinkable
Hi everyone!!
So I'm having this iframe on my website with javascript scrollbuttons outside of it, (Example)
Links wont open in the iframe, but in a full window. I have tried including target="Iframename" in the link code, but it does not work. (EDIT: Scratch the imagemap stuff, it just complicates things. So now its just links)
Do I need some other code, javascript prehaps? Or is it just not possible at all?
Code for my links to open in the iframe called datamain (does not work right):
Code for the iframe (works):
Code for bottom of pages thats supposed to load inside the iframe (works):
Thank you very much for any help! :bowdown:
Hi everyone!!
So I'm having this iframe on my website with javascript scrollbuttons outside of it, (Example)
Links wont open in the iframe, but in a full window. I have tried including target="Iframename" in the link code, but it does not work. (EDIT: Scratch the imagemap stuff, it just complicates things. So now its just links)
Do I need some other code, javascript prehaps? Or is it just not possible at all?
Code for my links to open in the iframe called datamain (does not work right):
Code:
<a href="http://www.Test.php" target="datamain">Test.php</a>
Code:
<!--Scrollable iframe script- By Dynamic Drive-->
<!--For full source code and more DHTML scripts, visit http://www.dynamicdrive.com-->
<!--This credit MUST stay intact for use-->
<iframe id="datamain" src="http://indextest.php" width=250 height=250 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=0 scrolling=no></iframe>
<layer visibility=hide>
<div style="width:250px;" align="right">
<a href="#" onMouseover="scrollspeed=-4" onMouseout="scrollspeed=0"><img src="http://Up.png" border="0"></a> | <a href="#" onMouseover="scrollspeed=4" onMouseout="scrollspeed=0"><img src="http://Down.png" border=0></a>
</div>
</layer>
Code:
<!--DO NOT REMOVE BELOW SCRIPT. IT SHOULD ALWAYS APPEAR AT THE VERY END OF YOUR CONTENT-->
<script language="JavaScript1.2">
//Scrollable content III- By http://www.dynamicdrive.com
var speed, currentpos=curpos1=0,alt=1,curpos2=-1
function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}
function scrollwindow(){
temp=(document.all)? document.body.scrollTop : window.pageYOffset
alt=(alt==0)? 1 : 0
if (alt==0)
curpos1=temp
else
curpos2=temp
window.scrollBy(0,speed)
}
setInterval("initialize()",10)
</script>
Last edited: