Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
iframe scroll

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side
View previous topic :: View next topic  
Author Message
edgar



Joined: 28 Dec 2003
Posts: 916
Location: Pred monitorom

PostPosted: 17.03.2004 14:07    Post subject: iframe scroll Add user to your forum ignore list Reply with quote

Kako scrolati iframe ručno preko javascripta?

Uspio sam skrolanje namjestit, ali kako odredujem što da se skrola?

Kad koristim skriptu (tu dolje) onda mi se skrolaju svi iframeovi na stranici.
Namjestim kakav target?!

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="external.htm" width=150 height=150 marginwidth=0 marginheight=0 hspace=0 vspace=0 frameborder=1 scrolling=no></iframe>

<layer visibility=hide>
<div style="width:150px;" align="right">
<a href="#" onMouseover="scrollspeed=-2" onMouseout="scrollspeed=0">Up</a> | <a href="#" onMouseover="scrollspeed=2" onMouseout="scrollspeed=0">Down</a>
</div>
</layer>


source

<!--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>

_________________
Digital Genetics | Koote | Nuspojava
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 17.03.2004 14:30    Post subject: Add user to your forum ignore list Reply with quote

Code:
function initialize(){
if (window.parent.scrollspeed!=0){
speed=window.parent.scrollspeed
scrollwindow()
}
}


probaj ovdje umjesto parent upisati id tvog ifrejma, sad sam na faksu pa nemam kak probat el ce to sljakat, mozda ti zyt pomogne u medjuvremenu, on isto voli js :)

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
edgar



Joined: 28 Dec 2003
Posts: 916
Location: Pred monitorom

PostPosted: 17.03.2004 14:45    Post subject: Add user to your forum ignore list Reply with quote

a evo jesam nesto zbrčkao:D

sad radi kako treba...

moram jednom naučit taj jscript Embarassed
tnx

_________________
Digital Genetics | Koote | Nuspojava
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
che.UP
mi3.crew


Joined: 07 Sep 2003
Posts: 2320
Location: zagreb

PostPosted: 17.03.2004 14:47    Post subject: Add user to your forum ignore list Reply with quote

np, sretno :)

_________________
UP | TypeTester | Accommodations App
Meni u Firefox-u ne radi AJAX
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Client-side All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group