Pautan Skrol Dalam Kotak iFrame (IFrame Scroller)

Panduan untuk menyediakan iFrame Scroll dalam pos atau dalam sidebar blog.



Sila copy dan simpan dalam komputer anda fail external.htm dari laman http://www.dynamicdrive.com/dynamicindex2/iframe-scroller.htm:


Gunakan perisian Notepad sunting dan gantikan pautan dan tajuk dalam fail external.htm seperti yang berwarna merah berikut:


<html>
<body>

<div id="datacontainer" style="position:absolute;left:1px;top:10px;width:100%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">

<!-- ADD YOUR SCROLLER CONTENT INSIDE HERE -->

<b>What's Hot</b></p>
<p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex9/encrypter.htm" target="_top">Source
code encrypter</a>&nbsp;</small></font></strong><br>
<font face="Verdana" size="2">Scramble the source of any chunk of code using
this unique script.</font></p>
<p align="left"><strong><font face="Verdana"><small><a href="http://www.dynamicdrive.com/dynamicindex5/flashlink.htm" target="_top">Flashing
links</a>&nbsp;</small></font></strong><br>
<font face="Verdana"><small>Bring attention to special links, by making them
flash!</small></font></p>
<p align="left"><small><strong><font face="Verdana"><a href="http://www.dynamicdrive.com/dynamicindex13/roamcursor.htm" target="_top">Roaming
Cursor</a>&nbsp;</font></strong></small><br>
<small><font face="Verdana">Display a second, &quot;roaming&quot; cursor on your
page with this fun animation script.</font></small></p>
<p align="left"><font face="Verdana"><strong><a href="http://www.dynamicdrive.com/dynamicindex11/animatedtitle.htm" target="_top"><small>Animated
Document title</small></a><br>
</strong><small>Animate into view your document's title!</small></font>

<!-- END SCROLLER CONTENT -->

</div>

<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 speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=2

//Specify intial delay before scroller starts scrolling (in miliseconds):
var initialdelay=500

function initializeScroller(){
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj.style.top="5px"
setTimeout("getdataheight()", initialdelay)
}

function getdataheight(){
thelength=dataobj.offsetHeight
if (thelength==0)
setTimeout("getdataheight()",10)
else
scrollDiv()
}

function scrollDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed "px"
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top="5px"
setTimeout("scrollDiv()",40)
}

if (window.addEventListener)
window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload", initializeScroller)
else
window.onload=initializeScroller

</script>

</body>
</html>

Gantikan dengan pautan yang hendak dicapai dengan tajuk berkenaan. Pautan yang digunakan dalam contoh pos ini adalah seperti berikut:


<html>
<body>

<div id="datacontainer" style="position:absolute;left:1px;top:10px;width:100%" onMouseover="scrollspeed=0" onMouseout="scrollspeed=cache">

<!-- ADD YOUR SCROLLER CONTENT INSIDE HERE -->

<b>Panas</b></p>
<p align="left"><strong><font face="Verdana"><small><a href="http://panduanpemblog.blogspot.com/2009/08/rating-bintang-lima-pada-pos-blog.html" target="_top">Rating Bintang Lima Pada Pos</a>&nbsp;</small></font></strong><br>
<font face="Verdana"><small>Rating Bintang Lima Pada Pos Blog Anda</small></font></p>
<p align="left"><small><strong><font face="Verdana"><a href="http://panduanpemblog.blogspot.com/2009/08/pasang-statcounter-kunter-pengunjung.html" target="_top">Pasang Kaunter Pengunjung Dalam Blog</a>&nbsp;</font></strong></small><br>
<small><font face="Verdana">Pasang kaunter jumlah pengunjung dalam blog anda</font></small></p>
<p align="left"><font face="Verdana"><strong><a href="http://panduanpemblog.blogspot.com/2009/03/writeobjects.html" target="_top"><small>Imej Selak (Page Peel) Untuk Blog</small></a><br>
</strong><small>Imej Selak (Page Peel) Dalam Blog Anda</small></font>
<p align="left"><font face="Verdana"><strong><a href="http://panduanpemblog.blogspot.com/2009/03/salji-turun-dalam-blog-versi-2.html" target="_top"><small>Salji Turun Dalam Blog</small></a><br>
</strong><small>Salji Turun Dalam Blog</small></font>
<p align="left"><font face="Verdana"><strong><a href="http://pandunewblogger.blogspot.com/2009/09/daftar-dengan-sigmirror-untuk-hos-fail.html" target="_top"><small>Daftar Dengan Sigmirror Untuk Hos Fail Javascript</small></a><br>
</strong><small>Daftar Dengan Sigmirror Untuk Hos Fail Javascript</small></font>
<!-- END SCROLLER CONTENT -->

</div>

<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 speed of scroll. Larger=faster (ie: 5)
var scrollspeed=cache=2

//Specify intial delay before scroller starts scrolling (in miliseconds):
var initialdelay=500

function initializeScroller(){
dataobj=document.all? document.all.datacontainer : document.getElementById("datacontainer")
dataobj.style.top="5px"
setTimeout("getdataheight()", initialdelay)
}

function getdataheight(){
thelength=dataobj.offsetHeight
if (thelength==0)
setTimeout("getdataheight()",10)
else
scrollDiv()
}

function scrollDiv(){
dataobj.style.top=parseInt(dataobj.style.top)-scrollspeed "px"
if (parseInt(dataobj.style.top)<thelength*(-1))
dataobj.style.top="5px"
setTimeout("scrollDiv()",40)
}

if (window.addEventListener)
window.addEventListener("load", initializeScroller, false)
else if (window.attachEvent)
window.attachEvent("onload", initializeScroller)
else
window.onload=initializeScroller

</script>

</body>
</html>

Hoskan fail external.htm ini dalam hos fail javascript dan catatkan pautan hotlinknya. Ikut panduan bagaimana cara Daftar Dengan Sigmirror Untuk Hos Fail Javascript.

Copy script berikut dan masukkan pautan hotlink fail external.htm di tempat yang ditunjukkan dan masukkan script ini samada dalam pos blog anda (bawah mode Edit HTML) atau masukkan dalam sidebar blog anda melalui Add a Gadget.


<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="http://www.sigmirror.com/files/30700_jksfj/external.htm]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="200px" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="1" scrolling="no"></iframe>')

</script>

Sekian, selamat mencuba dan selamat berjaya.

Sebarang pautan balik dari blog anda adalah sangat-sangat dihargai. URL http://panduanpemblog.blogspot.com/.

Salam hormat dari

Pautan Skrol Dalam Kotak iFrame (IFrame Scroller)SocialTwist Tell-a-Friend

1 comments:

Salam TT...Mcm mana TT buatkan scroll bar utk display "Pos" item dan "Pos Terbaru"

sekian
laman-usahawan.blogspot.com


Post a Comment

MyBlogLog

Sponsor

Feed

Powered by Blogger.

Soal Jawab Agama


Recent Posts

Pages

Follow

All Posts

Counter

Jerit

Sepanjang Jalan Kenangan



About Me

Followers

Colors Catalog by Maya