|
 |
|
ช่วยผมด้วยคับ ผมอยากให้ function showdata() ทำงานก่อนกดปุ่ม submit เพียงไม่กี่วินาที่คับ |
|
 |
|
|
 |
 |
|
onsubmit ไม่ได้คับ คือโปรแกรมจะแสดง แค่ตัวของ function จะไม่ส่งค่าไปที่ 'income_store.php' ครับ
ขอบคุณสำหรับผู้ที่ตอบด้วยนะครับ
|
 |
 |
 |
 |
Date :
2009-02-26 16:08:07 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมสงสัยคั บแล้วระบบมันจะรู้ได้ยังไงว่าผู้ใช้จะกดปุ่มตอนไหน 
|
 |
 |
 |
 |
Date :
2009-02-26 16:13:48 |
By :
zankumuro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
เรพ 4 ถามใครคับ
|
 |
 |
 |
 |
Date :
2009-02-26 16:17:17 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถามใครก็ได้คับ เจ้าของกระทู้บอกต้องการแสดงก่อนกดปุ่ม submit เพียงไม่กี่วินาที โดยไม่ให้ใช้ timeout ผมก็เลยสงสัย ว่าระบบมันจะรู้ได้ไงว่าใครมันจะกดปุ่มตอนไหน แบบว่าผมไม่ค่อยคล่องพวก Javascript มันเลยงงๆ เพราะปกติ เวลาผมใช้ก็หนีไม่พ้น timeout
|
 |
 |
 |
 |
Date :
2009-02-26 16:23:13 |
By :
zankumuro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
คุณ เอี่ยวคับ โปรแกรมมันยังเค้าไปเปิดใช้ function อยู่คับ ไม่ยอมส่งค่าไป ที่ income_store คับ
|
 |
 |
 |
 |
Date :
2009-02-26 16:24:18 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ลืมไป
<form onsubmit="return showdata();"> แทนนะครับ
|
 |
 |
 |
 |
Date :
2009-02-26 16:29:57 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
น่าสนุกทีเดียวเชียว ทำแบบนี้ก็ได้ด้วยหรอ
i<100000
ถ้าเป็นคนนับ ก็คงใช้เวลาประมาณครึ่งวัน (รวมนับผิดนับถูก)
|
 |
 |
 |
 |
Date :
2009-02-26 16:34:35 |
By :
p_latplee |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่ได้ครับพี่
|
 |
 |
 |
 |
Date :
2009-02-26 16:34:53 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ถ้าใช้เวลา ก็ต้องใช้ loop อยู่ดีอ่ะ
|
 |
 |
 |
 |
Date :
2009-02-26 16:35:07 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
สงสารคนถามจัง ยังไม่ได้เลย TT 
|
 |
 |
 |
 |
Date :
2009-02-26 16:36:03 |
By :
pjgunner |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่ได้คับ
/******************/
คือผมต้องการให้ใช้ ฟังชันนี้ก่อนก่อนที่จะกด submit อ่ะคับ
เพราะค่าที่ฟังก์ชันนี้ดังข้อมูลมามันเป็นค่าที่มีการ update ตลอดเวลาคับ
/********************/
|
 |
 |
 |
 |
Date :
2009-02-26 16:43:27 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ก็เลยต้องให้มันเรียกใช้ให้สุดท้ายที่สุดก่อนที่จะกด submit
|
 |
 |
 |
 |
Date :
2009-02-26 16:45:03 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อยากจะช่วยเหมือนกัน แต่ผมก็ยังงงอยู่ว่าจะเช็คยังไงว่า คนมันจะกดปุ่มตอนไหน ถ้าเซ็ตเวลาไว้ ถ้าเขากดก่อน ข้อมูลมันก็ไม่ขึ้นซิคับ หรือถ้าเขายังไม่กด ข้อความนั่นก้ขึ้นไปตั้งนานแล้ว
เวียน Head จริงๆ
|
 |
 |
 |
 |
Date :
2009-02-26 16:48:09 |
By :
zankumuro |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
พอใช้แล้วมันเหมือนกับว่ามันไม่ได้เรียกใช้ function ครับ
|
 |
 |
 |
 |
Date :
2009-02-26 17:04:22 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ไม่ได้ครับ โปรแกรมมันจะแสดงแต่ function มันจะไม่ post ค่า ไป form อื่น
|
 |
 |
 |
 |
Date :
2009-02-26 17:10:13 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ผมว่าคำถามมีลับลมคมในยังงัยไม่รู้ เหมือนบอกข้อมุลไม่หมด
|
 |
 |
 |
 |
Date :
2009-02-26 17:14:34 |
By :
ลับๆล่อๆ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
ตัว function จะดึงข้อมูลจาก form อื่นมาครับ แล้วผมจะให้มันมาแสดง ที่ form 2
|
 |
 |
 |
 |
Date :
2009-02-26 17:19:48 |
By :
savok_hiphop |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แก้ที่ code อาจจะยาก หรือว่า งงๆ
คุณลองแก้ที่ logic ได้หรือเปล่า หรือว่าจำเป็นต้องเป็น logic แบบนี้เท่านั้น
การแก้ปัญหาไม่ได้อยู่ที่การแก้ code อย่างเดียวครับ เรื่อง logic ก็สำคัญครับ
ถ้า code แก้ไม่ได้ หรือว่าหาทางแก้ยาก ก็ควรเปลี่ยน logic ในการทำงานครับ
ปล. ถ้าไม่กำหนด logic ในการทำงานแบบตายตัวนะครับ
 
|
 |
 |
 |
 |
Date :
2009-02-26 18:28:48 |
By :
ochitae |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 03
|