Jumat, 05 Juli 2013

gan mau tanya,gimana caranya bila nama ikan dipili...

Thank you for using rssforward.com! This service has been made possible by all our customers. In order to provide a sustainable, best of the breed RSS to Email experience, we've chosen to keep this as a paid subscription service. If you are satisfied with your free trial, please sign-up today. Subscriptions without a plan would soon be removed. Thank you!
Gondo Malaikat 7:02am Jul 5
gan mau tanya,gimana caranya bila nama ikan dipilih hatganya bsa muncul secara otomatis,jika jumlah yg di pesan hasil prkalian total byrnya bisa muncul otomatis ini scripnya mohon bntuannya ya gan
<html>
<head>
<title>BALAI BENIH IKAN</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="header">
<br>
<marquee behavior="alternate" style="font-family: impact;font-size:30px;color:#000000;" align="top" direction="right">
<h1 align="center">BALAI BENIH IKAN</h1
></marquee>
</div>
<div id="leftbar">
<div class="menu">
<ul>
<li><a href="index.php"><b>HOME</b></a></li>
<li><a href="tips.php"><b>CARA PEMESANAN</b></a></li>
<li><a href="ikan_order.php"><b>ORDER IKAN</b></a></li>
<li><a href="order_benih.php"><b>ORDER BENIH</b></a></li>
<li><a href="HARGA_IKAN.php"><b>IKAN KONSUMSI</b></a></li>
<li><a href="HARGA_BENIH.php"><b>BENIH IKAN</b></a></li>
</ul>
</div>
</div>
<div id="contain">
<td>
<table align="center"width="100" height="50" border="10" bordercolor="#333333">
<tr>
<td align="center" width="50" height="32" class="style1"><pre><span class="style1"><h2>Nama benih</h2></span></pre></td>
<td align="center" width="50" height="32" class="style1"><pre><span class="style1"><h2>benih</h2></span></pre></td>
<td align="center" width="80" height="32" class="style1"><pre><span class="style1"><h2>Harga</h2></span></pre></td>
</tr>
<?php
mysql_connect("localhost","root","");
mysql_select_db("anton");
$query = mysql_query("SELECT * FROM `bibit` WHERE 1");
while ($row= mysql_fetch_array($query)){
$nama_benih =$row['nama_benih'];
$harga_benih =$row['harga_benih'];
$foto =$row['foto'];

?>
<tr>
<td align="center" width="150" height="35"><h3><?php echo $nama_benih; ?></h3></td>
<td align="center" width="150" height="35"><h3><?php if(isset($foto)){echo"<img src='admin/foto/$foto' width='150'>";}?></h3></td>
<td align="center" width="150" height="35"><h3><?php echo $harga_benih; ?></h3></td>
</tr>
<?php
}
?>
</table>
</div>
<div id="footer">
<p align="center">BBI Balai Benih Ikan</p>
</div>
</body>
</html>

<script type="text/javascript">
function pilih(pilihan){

var ubah = "<select name='kg'><option value='0'>Pilih</option>";

for(i=1;i<=4;i++){

harga = pilihan*i;
ubah += "<option value='"+harga+"/"+i+"Kg'>"+harga+"/"+i+"Kg</option>";

}
ubah += "</select>";
document.getElementById("kg").innerHTML = ubah;
}
</script>

Nama Benih:
<select name="benih" onchange="pilih(this.value);">
<option value="0" selected>Pilih</option>
<option value="1000" >nila</option>
<option value="2000" >gurame</option>
<option value="3000" >mas</option>
<option value="4000" >patin</option>
</select><br /><br />

Per KG:
<div id="kg"></div>

Firman Yulham Syahrial 7:04am Jul 5
cba copy script nya di pastebin dong T.T
bacanya sdkit bgung

Gondo Malaikat 7:06am Jul 5
<html>
<head>
<title>BALAI BENIH IKAN</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="container">
<div id="header">
<br>
<marquee behavior="alternate" style="font-family: impact;font-size:30px;color:#000000;" align="top" direction="right">
<h1 align="center">BALAI BENIH IKAN</h1
></marquee>
</div>
<div id="leftbar">
<div class="menu">
<ul>
<li><a href="index.php"><b>HOME</b></a></li>
<li><a href="tips.php"><b>CARA PEMESANAN</b></a></li>
<li><a href="ikan_order.php"><b>ORDER IKAN</b></a></li>
<li><a href="order_benih.php"><b>ORDER BENIH</b></a></li>
<li><a href="HARGA_IKAN.php"><b>IKAN KONSUMSI</b></a></li>
<li><a href="HARGA_BENIH.php"><b>BENIH IKAN</b></a></li>
</ul>
</div>
</div>
<div id="contain">
<td>
<table align="center"width="100" height="50" border="10" bordercolor="#333333">
<tr>
<td align="center" width="50" height="32" class="style1"><pre><span class="style1"><h2>Nama benih</h2></span></pre></td>
<td align="center" width="50" height="32" class="style1"><pre><span class="style1"><h2>benih</h2></span></pre></td>
<td align="center" width="80" height="32" class="style1"><pre><span class="style1"><h2>Harga</h2></span></pre></td>
</tr>
<?php
mysql_connect("localhost","root","");
mysql_select_db("anton");
$query = mysql_query("SELECT * FROM `bibit` WHERE 1");
while ($row= mysql_fetch_array($query)){
$nama_benih =$row['nama_benih'];
$harga_benih =$row['harga_benih'];
$foto =$row['foto'];

?>
<tr>
<td align="center" width="150" height="35"><h3><?php echo $nama_benih; ?></h3></td>
<td align="center" width="150" height="35"><h3><?php if(isset($foto)){echo"<img src='admin/foto/$foto' width='150'>";}?></h3></td>
<td align="center" width="150" height="35"><h3><?php echo $harga_benih; ?></h3></td>
</tr>
<?php
}
?>
</table>
</div>
<div id="footer">
<p align="center">BBI Balai Benih Ikan</p>
</div>
</body>
</html> ini scrip comboobokny <script type="text/javascript">
function pilih(pilihan){

var ubah = "<select name='kg'><option value='0'>Pilih</option>";

for(i=1;i<=4;i++){

harga = pilihan*i;
ubah += "<option value='"+harga+"/"+i+"Kg'>"+harga+"/"+i+"Kg</option>";

}
ubah += "</select>";
document.getElementById("kg").innerHTML = ubah;
}
</script>

Nama Benih:
<select name="benih" onchange="pilih(this.value);">
<option value="0" selected>Pilih</option>
<option value="1000" >nila</option>
<option value="2000" >gurame</option>
<option value="3000" >mas</option>
<option value="4000" >patin</option>
</select><br /><br />

Per KG:
<div id="kg"></div>

Gondo Malaikat 7:07am Jul 5
scrip nya tolong di bantu gan posing nih

Gondo Malaikat 7:08am Jul 5
ini gmbarnya gan

Cahya Dsn 7:17am Jul 5
script sama gambar yang diposting beda ^_^V

Gondo Malaikat 7:18am Jul 5
ea gan gmbarnya nih buat gmbaran ny aj tolong d bntu gann

Rudi Syaifudin 7:19am Jul 5
cm bisa bantu clue aj om,
- field nama ikan klo bisa pake jquery autocomplete, scriptnya? (google) paling gampang pake jqueryUI autocomplete.

-field harga pelajari callback value dr jqueryUI autocomplete, jika ada maka isi harga sesuai nama ikan. scriptnya? (pelajari dlu autocomplete, ntr tnggal pake aj kok)

-field total bayar pake jquery on keyup, jadi ketika jmlh yg dpesak dketik, dia langsung calculate dan ngisi ke field total. scriptnya ?

$('#jmlpsn_id').keyup(function() {
var x=parseInt($(this).val());
var harga=5000; //dr db
var tot= x*harga;
$('#fieldtot_id').val(tot);
});
//cek lg mungkin ad yg salah

SoeBa DjoeGi 7:19am Jul 5
Cahya Dsn (y) gambar n coding beda

Gondo Malaikat 05 Jul, 2013


-
Source: http://www.facebook.com/groups/35688476100/?id=10151736675521101
--
Manage subscription | Powered by rssforward.com

Tidak ada komentar:

Posting Komentar