sori lupa ngasih tag form-nya, ini tagnya : <form action='list.php' 
method='post' name=formbuku>, nah kalo pakai tombol submit , isi formnya kan 
kebawa ke halaman list.php, tombol submit itu dipakai untuk delete, dan tombol 
button ini saya ingin pakai untuk cetak label dan ke halaman yg lain 
(label.php) bukan ke list.php .bisa ngga yah kira kira ?
  ini script lengkapnya 
  apa di javascriptnya (buku.php) harus ada tambahan parameter lagi ?
  untuk delete ngga ada masalah.
   
  buku.php
  <script language=javascript>
  function buka() {
  window.open('label.php','','width=300,height=300,scrollbars=yes');
  }
  <?
  include "conn.php";
  echo "<form action='list.php' method='post' name=formbuku>"; 
  $data=mysql_query("select * from tb_buku");
  while($list=mysql_fetch_array($data))
  {
  echo "<input type=checkbox name=daftar[] 
value=$list[id_buku]>$list[nm_buku<br>";
  }
  echo "<input type=submit name=hapus value=Delete><br>";
  echo "<input type=button value=cetak onclick=\"javascript:buka()\">";
  echo "</form>";
  ?>
   
  list.php
  <?
  include "conn.php";
  foreach($daftar as $daf)
  {
  mysql_query("delete from tb_buku where id=$daf");
  }
  ?>
   
  label.php
  <?
  foreach ($daftar as $daf)
  {
  echo "$daf<br>";
  }
  ?>
   
  thanks atas tanggapannya,
  tito
  
Acho <[EMAIL PROTECTED]> wrote:
          Ngga ada apa2, karna anda ngga pake tag <form action=""></form>. Anda 
cuma 
buka halaman label.php tanpa membawa parameter apa2 jadi ya kosong.

Muhadkly - Acho- , http://muhadly.info
=============================

----- Original Message ----- 
From: tito surya wardhana
To: [email protected]
Sent: Sunday, January 14, 2007 5:27 PM
Subject: [ITCENTER] php lagi donk pls?

gimana caranya untuk menampilkan data ke window baru dengan javascript 
window.open.

saya buat script spt ini :
buku.php
<script language=javascript>
function buka(){
window.open('label.php','','widht=300,height=400,scrollbars=yes');
}
<?
include "conn.php";
$data=mysql_query("select * from tb_buku");
while($list=mysql_fetch_array($data))
{
echo "<input type=checkbox name=daftar[] 
value=$list[id_buku]>$list[nm_buku]";
}
echo "<input type=button value=cetak onclick=\"javascript:buka()\">";
?>

label.php
<?
foreach($daftar as $daf)
{
echo "$daf<br>";
}
?>
tapi di halaman label.php tidak tampil apa2 tuh.
tolong pls..

thanks

tito

---------------------------------
Finding fabulous fares is fun.
Let Yahoo! FareChase search your favorite travel sites to find flight and 
hotel bargains.

[Non-text portions of this message have been removed]



         

 
---------------------------------
It's here! Your new message!
Get new email alerts with the free Yahoo! Toolbar.

[Non-text portions of this message have been removed]



-- 
www.itcenter.or.id - Komunitas Teknologi Informasi Indonesia 
Gabung, Keluar, Mode Kirim : [EMAIL PROTECTED] 
## Jobs: itcenter.or.id/jobs ## Bursa: itcenter.or.id/bursa ##

## Jaket ITCENTER tersedia di http://shop.itcenter.or.id 
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ITCENTER/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/ITCENTER/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Kirim email ke