Tolong pilih kategori sesuai, jenis posting (diskusi atau bukan) dan sertakan tag/topik yang sesuai seperti komputer, java, php, mysql, dll. Promosi atau posting tidak pada tempatnya akan kami hapus!
- Bagi Anda yang ingin mendaftar, baca link berikut:
http://diskusiweb.com/discussion/50491/how-to-registrasi-diskusiweb-com-baca-ini-terlebih-dahulu
- Cara menyisipkan kode program supaya tampil rapi dan terformat dengan baik di diskusiweb.com: http://www.diskusiweb.com/discussion/50415/cara-menyisipkan-kode-program-di-diskusiweb-com
- Cara posting gambar/image di post Anda: http://www.diskusiweb.com/discussion/47345/cara-menyisipkan-menyertakan-image-pada-posting/p1

Image Slideshow

ka2 yg baik, da yg bs ksh tau script image slideshow yg bs dihubungi ke database ga?
Ak dah nyoba, tp g mau nampilin data dari database.
Kali ja da yg punya yg dah jadi.......

Comments

  • Ya digabungin sama js. PHP sama js
  • Ni tak kasih scriptnya waktu masih full HTML dan slideshownya bisa berjalan :
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <link href="css/kompas.css" rel="stylesheet" type="text/css">
    <link href="css/menu.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="script/script.js"></script>
    
    <style type="text/css">
    body { margin-bottom:0px; margin-left:0px; margin-right:0px; margin-top:0px; }
    #standard {
    	position:absolute;
    	left:680px;
    	top:945px;
    	width:301px;
    	height:249px;
    	z-index:999;
    }
    #expand {
    	position:absolute;
    	left:382px;
    	top:945px;
    	width:389px;
    	height:209px;
    	z-index:998;
    	visibility:hidden;
    }
    #Layer2 {
    	position:absolute;
    	left:58px;
    	top:17px;
    	width:333px;
    	height:211px;
    	z-index:1000;
    	background-color: #000000;
    }
    .style1 {color: #FFFFFF}
    	#tf { position: absolute; left: 0px; top: 0px;text-align:center; width: 100%; z-index:1000; }
    	#tb { position: absolute; left: 0px; bottom: 0px;text-align:center; width: 100%; z-index:1000; }	
    	div > div#tf { position: fixed; }
    	div > div#tb { position: fixed; }
    	pre.fixit { overflow:auto;border-left:1px dashed #000;border-right:1px dashed #000;padding-left:2px; }
    </style>
    <!--[if gte IE 5.5]><![if lt IE 7]>
    	<style type="text/css">
    		div#tf {
    		left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
    		top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    		}
    		div#tb {
    		right: auto; bottom: auto;
    		left: expression( ( 0 - tb.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
    		top: expression( ( 0 - tb.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    		}
    	</style>
    <![endif]><![endif]-->
    </head>
    <body>
    <!--begin slide -->
    <div id="headtabs" class="slidemenu">
    <ul><li><a href="#" rel="head1">1</a></li><li><a href="#" rel="head2">2</a></li></ul>
    <div style="clear:both;"></div>
    
    <div style="clear:both;"></div>
    </div>
    <div id="head1"   style="height:410px;"class="tabcontent">
    
    <div class="boximgheadline"><img src="233014p.jpg">
    <span><a href="#" onMouseover="ddrivetip('<div id=tooltip><div><b>15 Orang Tertimbun Longsor</b></div><span>Foto Oleh: TRIBUN JABAR/FIRMAN SURYAMAN<br>Lihat foto lainnya</span></div>', 240)"; onMouseout="hideddrivetip()">TRIBUN JABAR/FIRMAN SURYAMAN</a></span>
    <div style="clear:both"></div></div>
    <div class="judulheadline">
    <a href="berita1.html">15 Orang Tertimbun Longsor</a>
    </div>
    <div class="tanggal">Regional - Jumat, 14 November 2008 | 11:04 WIB</div>
    <div>Sebanyak 15 penduduk Nyalindung, Kecamatan Campaka, Kabupaten Cianjur dikabarkan tertimbun bersama rumah.</div>
    </div>
    
    <div id="head2"   style="height:410px;"class="tabcontent">
    
    <div class="boximgheadline"><img src="a4bc222de7bae7f3f8898e6e24bd077a400x280.jpg">
    <span><a href="#" onMouseover="ddrivetip('<div id=tooltip><div><b>Rihanna Dapat Lingerie Mahal dari Pacar     </b></div><span>Foto Oleh: GETTY IMAGES/VITTORIO ZUNINO CELOTTO<br>Lihat foto lainnya</span></div>', 240)"; onMouseout="hideddrivetip()">GETTY IMAGES/VITTORIO ZUNINO CELOTTO</a></span>
    <div style="clear:both"></div></div>
    <div class="judulheadline">
    <a href="berita2">Rihanna Dapat Lingerie Mahal dari Pacar     </a>
    </div>
    <div class="tanggal"> - Jumat, 14 November 2008 | 10:10 WIB</div>
    <div>Rihanna belum lama ini mendapat hadiah lingerie atau pakaian dalam berharga ratusan poundsterling dari kekasihnya, Chris Brown.</div>
    </div>
    <script type="text/javascript">
    
    var myheads=new ddtabcontent("headtabs")
    myheads.setpersist(false)
    myheads.setfade(true)
    myheads.setselectedClassTarget("link")
    myheads.init(5000)
    </script>
    <!--end slide -->
    </div>
    <div style="clear:both;"></div>
    </div>
    
    </body>
    </html>
    <!-- 01 -->
    

    dan yang ni script yang telah diubah menjadi php dengan dihubungkan ke database:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <link href="css/kompas.css" rel="stylesheet" type="text/css">
    <link href="css/menu.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="script/kompas.js"></script>
    
    <style type="text/css">
    body { margin-bottom:0px; margin-left:0px; margin-right:0px; margin-top:0px; }
    #standard {
    	position:absolute;
    	left:680px;
    	top:945px;
    	width:301px;
    	height:249px;
    	z-index:999;
    }
    #expand {
    	position:absolute;
    	left:382px;
    	top:945px;
    	width:389px;
    	height:209px;
    	z-index:998;
    	visibility:hidden;
    }
    #Layer2 {
    	position:absolute;
    	left:58px;
    	top:17px;
    	width:333px;
    	height:211px;
    	z-index:1000;
    	background-color: #000000;
    }
    .style1 {color: #FFFFFF}
    	#tf { position: absolute; left: 0px; top: 0px;text-align:center; width: 100%; z-index:1000; }
    	#tb { position: absolute; left: 0px; bottom: 0px;text-align:center; width: 100%; z-index:1000; }	
    	div > div#tf { position: fixed; }
    	div > div#tb { position: fixed; }
    	pre.fixit { overflow:auto;border-left:1px dashed #000;border-right:1px dashed #000;padding-left:2px; }
    </style>
    <!--[if gte IE 5.5]><![if lt IE 7]>
    	<style type="text/css">
    		div#tf {
    		left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
    		top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    		}
    		div#tb {
    		right: auto; bottom: auto;
    		left: expression( ( 0 - tb.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
    		top: expression( ( 0 - tb.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    		}
    	</style>
    <![endif]><![endif]-->
    </head>
    <body>
    <!--begin slide -->
    <div id="headtabs" class="slidemenu">
    <ul>
    <?php
    	include "connect.php";
    	$query = "SELECT * FROM `indeks` WHERE `kategori`='headline' and `kota`='tegal' and `date`='25 Oktober 2008'";
    	$result = mysql_query($query);
    	$jml = mysql_num_rows($result);
    	echo $jml;
    	for($i=1; $i<=$jml; $i++) {
    		$head = "head" + $i;
    		echo "<li><a href='#' rel='" . $$head . "'>" . $i . "</a></li>";
    	}
    ?>
    <div style="clear:both;"></div>
    </div>
    <?php
    $i = 1;
    while($data = mysql_fetch_array($result)) {
    	$head = "head" + $i;
    	echo "<div id='" . $$head . "' style='height:410px;' class='tabcontent'>
    			<div class='boximgheadline'><img src='" . $data['upload'] . "'>
    			<span><a href='#' onMouseover='ddrivetip(\'<div id=tooltip><div><b>" . $data['title'] . "</b></div></div>\', 240)'; 
    			onMouseout='hideddrivetip()'>" . $data['title'] . "</a></span>";
    	echo "<div style='clear:both'></div></div>
    			<div class='judulheadline'>
    			<a href='http://www.koranlokal.com/news.php?no=" . $data['no'] . "'>" . $data['judul'] . "</a></div>
    			<div class='tanggal'>" . $data['date'] . "--" . $data['time'] . "</div>";
    	echo "<div>" . $data['petikan'] . "</div></div>";
    	$i++;
    }
    ?>
    </div>
    <script type="text/javascript">
    
    var myheads=new ddtabcontent("headtabs")
    myheads.setpersist(false)
    myheads.setfade(true)
    myheads.setselectedClassTarget("link")
    myheads.init(5000)
    </script>
    <!--end slide -->
    </div>
    <div style="clear:both;"></div>
    </div>
    
    </body>
    </html>
    <!-- 01 -->
    

    Nah ak minta tolong dong, sebenere bagian mana yg salah,
    Koq ga mau nampilin data dari database ?
  • da yang lain ga?
  • Originally posted by ika.aprilia
    da yang lain ga?

    search di google...
Sign In or Register to comment.