|
 |
|
เปิดหน้าใหม่ เป็น lytebox แล้วให้อ่านข้อมูลด้วย เข้าดาต้าเบสด้วย แก้ยังไงค่ะ |
|
 |
|
|
 |
 |
|
อันนี้ตัวไฟล์newslettersubmit.php
$sql = "insert into mailregister (mail_register) values ('" .$_POST["email"]. "')";
<form id="ns_subscribe" name="ns_subscribe" method="post" onSubmit="target= openSubscribe(this);" action="newslettersubmit.php"><input id="ns_email" title="enter your email address" maxlength="100" value="Vul hier uw e-mailadres in" name="email" onfocus="doClear(this);" onblur="undoClear(this);"> <input class="linkbutton" id="button" title="subscribe to kaifa's monthly newsletter" type="submit" value="Inschrijven" name="kaifasubcribe"> </form>
ตัวนี้ตัวสคริป์รัน
function openSubscribe(f) {
var u = f.action+"?email="+f.elements["email"].value;
var anchor = this.document.createElement('a');
anchor.setAttribute('href', u);
anchor.setAttribute('rel', 'lyteframe');
anchor.setAttribute('title', '');
anchor.setAttribute('rev', 'width: 500px; height: 460px; scrolling: auto;');
myLytebox.start(anchor, false, true);
return false;[/u][u]
ท่อนนี้แหล่ะค่ะ ที่สร้างปัญหา
ตอนนี้ เปิดหน้าต่างออกมาเป็น 2 หน้าต่างอยู่ค่ะ
onSubmit="target= openSubscribe(this);"
ตัวที่เปิดหน้าใหม่ส่งข้อมูลได้ค่ะ ตัวที่เปิดรันสคริป์ไม่สามารถส่งข้อมูลไปได้ค่ะ
อยากได้ตัวที่รันสคริป์สามารถส่งข้อมูลได้ค่ะ
ช่วยหน่อยน่ะค่ะ คลำเองมาหลายเดือนแล้ว อ่านหนังสือก้ไม่รู้เรื่อง
|
 |
 |
 |
 |
Date :
2009-06-18 23:42:19 |
By :
เปิ้ล |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
onSubmit="return openSubscribe(this);"
|
 |
 |
 |
 |
Date :
2009-06-19 01:31:58 |
By :
plakrim |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ขอบคุณค่ะ คุณ PlaKriM
สรุปว่า มันทำไม่ได้ค่ะ ต้องไปต่ออีกเพจนึง เลยมีคำถามมาใหม่
หากเราต้องการให้รับ ค่าจาก Textbox ไปยังText Box หน้าถัดไป
คิดว่าเขียนโค้ดนี้ไม่ถูกค่ะ แก้หลายอย่างแล้วยังไม่ได้ ไม่ทราบว่าติดตรงไหน
----------ไฟล์ต้นทาง
<FORM action="newsletterform.php" method="get" name="ns_subscribe" id="ns_subscribe" onSubmit="return openSubscribe(this);" >
<input name="email" type="text" onblur=undoClear(this); title="enter your email address" onfocus=doClear(this); value="Vul hier uw e-mailadres in"/>
<input type="submit" name="Submit" value="inschrijven" title="subscribe to kaifa's monthly newsletter"/></FORM>
function openSubscribe(f) {
var u = f.action+"?email="+f.elements["email"].value;-------------------------คาดว่าปัญหาอยู่ที่ท่อนนี้ค่ะ
var anchor = this.document.createElement('a');
anchor.setAttribute('href', u);
anchor.setAttribute('rel', 'lyteframe');
anchor.setAttribute('title', '');
anchor.setAttribute('rev', 'width: 670px; height: 400px; scrolling: auto;');
myLytebox.start(anchor, false, true);
return false;}
---------ไฟล์รับ ข้อมูล
<label for="email" class="required">Your e-mail</label>
<input name="email" type="text" id="email" size="25" maxlength="200" value="" />
ขอบคุณล่วงหน้าค่ะ 
|
 |
 |
 |
 |
Date :
2009-07-13 16:15:24 |
By :
apple |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สามารถรับค่าได้แล้วค่ะ
ไปแก้ใน ส่วนไฟล์รับ
<p><label for="email">Your e-mail</label>
<input name="email" type="text" id="email" size="25" maxlength="200" value="<?= $email= $_GET['email'];?>" /></p>
แหะๆๆ ขอบคุณค่ะ
เอิ๊กๆๆ
|
 |
 |
 |
 |
Date :
2009-07-14 11:23:07 |
By :
เปิ้ล |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 00
|