saya mau membuat aplikasi semacam POS...
Misalnya :
kita ada di Halaman misalnya inputTransaksi.php (untuk transaksi).. terus ada link untuk membuka Master Barang (Barang.php)... tapi terbuka di window lainnya..(ukurannya lebih kecil)
yang saya mau tanya :
1. Bagaimana cara transfer data dari halaman Master Barang ke Input Transaksi...
(Jadi semacam waktu kita mau kirim email menggunakan yahoo , ada daftar orang yang mau kita kirimin email)
Terima Kasih atas Jawabannya :D:D
View user's profile View All Posts By User U2U Member
Husni
Moderator
******
Avatar
Posts: 3230
Registered: 29/9/04
Location: http://adilmakmur.web.id/
Member Is Offline
Mood: Looking at You
[*] posted on 11/11/06 at 05:00 AM
Pake session mas...
Coba cari lagi di forum ini, sudah sering dibahas....
- catatan seorang pengembara -
View user's profile Visit user's homepage View All Posts By User U2U Member
boo
DwebberSejati
*****
Avatar
Posts: 1969
Registered: 28/8/06
Location: Atas Awan
Member Is Offline
Mood: i'm baaaaacccckkk...
[*] posted on 11/11/06 at 05:07 AM
...session... kayanya gak bisa Pak Husni... soalnya beda window... tapi dicoba dulu, 'kali saya yg salah...
yg terpikir ama saya, pake javascript, value-nya langsung dikirim ke object window-nya
http://www.diskusiweb.com/gambar/badges/mod_dwebber_blue.png http://boo.dosinta.com/myas-83841946.gif http://boo.dosinta.com/chs.gif http://boo.dosinta.com/spm.gif http://boo.dosinta.com/enc.gif
View user's profile Visit user's homepage View All Posts By User U2U Member
Husni
Moderator
******
Avatar
Posts: 3230
Registered: 29/9/04
Location: http://adilmakmur.web.id/
Member Is Offline
Mood: Looking at You
[*] posted on 11/11/06 at 12:38 PM
Saya coba seperti ini gagal:
window1.php
session_start();
$_SESSION["saya"] = "Aku";
echo $_SESSION["saya"];
?>
Klik
window2.php
session_start();
echo $_SESSION["saya"]
?>
_______________________
Saya coba seperti ini berhasil:
window1.php
session_start();
$_SESSION["saya"] = "Aku";
echo $_SESSION["saya"];
?>
Klik
window2.php
session_start();
echo $_SESSION["saya"]
?>
[img]http://us.i1.yimg.com/us.yimg.com/i/mesg/emoticons7/39.gif[/img]
- catatan seorang pengembara -
View user's profile Visit user's homepage View All Posts By User U2U Member
si_jun
Balita dwebber
**
Posts: 67
Registered: 4/9/06
Location: Porong
Member Is Offline
[*] posted on 11/11/06 at 07:18 PM
Quote:
Originally posted by Lightzero
Permisi saya mau tanya..
saya mau membuat aplikasi semacam POS...
Misalnya :
kita ada di Halaman misalnya inputTransaksi.php (untuk transaksi).. terus ada link untuk membuka Master Barang (Barang.php)... tapi terbuka di window lainnya..(ukurannya lebih kecil)
yang saya mau tanya :
1. Bagaimana cara transfer data dari halaman Master Barang ke Input Transaksi...
(Jadi semacam waktu kita mau kirim email menggunakan yahoo , ada daftar orang yang mau kita kirimin email)
Terima Kasih atas Jawabannya :D:D
Pakai Javascript and jangan lupa untuk merefres halaman yang awal karena jika ada perubahan data maka langsung akan berubah ?
View user's profile View All Posts By User U2U Member
boo
DwebberSejati
*****
Avatar
Posts: 1969
Registered: 28/8/06
Location: Atas Awan
Member Is Offline
Mood: i'm baaaaacccckkk...
[*] posted on 11/11/06 at 09:47 PM
@Pak Husni,
kalo cara pertama, session_id-nya berubah...
kalo cara kedua, session_id-nya sama...
sekarang tergantung Pak Lightzero, kalo pake model window.open(), value jg langsung di kirim lewat object window-nya pake javascript
kalo pake cara kedua, bisa pake session...
saya sendiri mungkin menyarankan lagi alternatif cara lain : cookies,
baik php maupun javascript bisa baca cookies,
tapi ntah kalo pake window.open() bisa gak baca cookies yg sama...
http://www.diskusiweb.com/gambar/badges/mod_dwebber_blue.png http://boo.dosinta.com/myas-83841946.gif http://boo.dosinta.com/chs.gif http://boo.dosinta.com/spm.gif http://boo.dosinta.com/enc.gif
View user's profile Visit user's homepage View All Posts By User U2U Member
Husni
Moderator
******
Avatar
Posts: 3230
Registered: 29/9/04
Location: http://adilmakmur.web.id/
Member Is Offline
Mood: Looking at You
[*] posted on 12/11/06 at 07:42 PM
Oh gitu ya Pak. Thanks atas pencerahannya :)
- catatan seorang pengembara -
View user's profile Visit user's homepage View All Posts By User U2U Member
Lightzero
Balita dwebber
**
Posts: 29
Registered: 29/3/06
Member Is Offline
[*] posted on 13/11/06 at 12:19 AM
Saya mau tanya lagi nih....
gimana ya caranya merefresh window 1 dari window 2 ... ??
Thanks..:D:D
View user's profile View All Posts By User U2U Member
boo
DwebberSejati
*****
Avatar
Posts: 1969
Registered: 28/8/06
Location: Atas Awan
Member Is Offline
Mood: i'm baaaaacccckkk...
[*] posted on 13/11/06 at 04:54 AM
Quote:
1. Bagaimana cara transfer data dari halaman Master Barang ke Input Transaksi...
(Jadi semacam waktu kita mau kirim email menggunakan yahoo , ada daftar orang yang mau kita kirimin email)
kayanya saya salah tangkep :D
coba ini :
inputTransaksi.html
-------------------------------------------------
-------------------------------------------------
masterBarang.html
-------------------------------------------------
-------------------------------------------------
gak perlu refresh halaman / window...
kalo pake refresh malah repot sendiri soalnya harus membuat form mempertahankan isi yg sudah diisikan sebelumnya...
http://www.diskusiweb.com/gambar/badges/mod_dwebber_blue.png http://boo.dosinta.com/myas-83841946.gif http://boo.dosinta.com/chs.gif http://boo.dosinta.com/spm.gif http://boo.dosinta.com/enc.gif
View user's profile Visit user's homepage View All Posts By User U2U Member
Lightzero
Balita dwebber
**
Posts: 29
Registered: 29/3/06
Member Is Offline
[*] posted on 13/11/06 at 06:42 AM
Thanks .. bos..
ada 1 Kendala :
Gimana cara melakukannya di FireFox... ??
Soalnya ada pesan Kesalahan
Quote:
window.opener.mbarang has no properties
Tapi kalau menggunakan browser seperti Opera dan IE .. jalan...
Ada yang tau cara settingannya ???
(Kalau menggunakan perintah alert("TEST";) ... jalan..)
Terima Kasih...
View user's profile View All Posts By User U2U Member
boo
DwebberSejati
*****
Avatar
Posts: 1969
Registered: 28/8/06
Location: Atas Awan
Member Is Offline
Mood: i'm baaaaacccckkk...
[*] posted on 13/11/06 at 11:07 AM
file masterBarang.html,
baris ini :
window.opener.mbarang.value = b.options[b.selectedIndex].value;
ganti jadi :
window.opener.document.getElementById('mbarang').value = b.options[b.selectedIndex].value;
sebenernya gini jg bisa jalan, object window-nya gak ditulis :
opener.document.getElementById('mbarang').value = b.options[b.selectedIndex].value;
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar