Jump to content
coisox

[dw+asp+vbscript] Onupdate, Database Tak Reload Sepenuhnya.

Recommended Posts

Camnie, aku buat ASP database guna Dreamweaver with VBscript. Ada satu form tu, aku buat multiple rekod update. means ada beberapa textField di mana user leh ubah, then bila click update baru SQL command kick in.

Masalahnya, katakan textField yg diubah tu ada 10, lepas user click button "Update", cuma 9 perubahan pertama dipaparkan. Masa nie kalau aku bukak file .mdb, database dah fully update. Cuma dia tak display lengkap kat browser. Then kalau aku click button "Update" utk kali ke-2 atau refresh browser, baru perubahan data yg terakhir tu dipaparkan.

Cuma data terakhir je tak dipaparkan yg terkini (tapi kat database sebenar dah ok). So kalau user ubah 5 textField, 4 je yg ok. So takkan aku nak suruh user click button "Update" twice or click refresh.

AKu dah try buat dummy page di mana after SQL command execute, current page akan panggil another dummy page then dummy page tu akan redirect semula ke page tadi. Ini bertujuan utk mengelakkan user terpaksa refresh browser manually. Tapi yg herannya, tak berkesan plak cara nie.

Actually aku belajar dari website DrDev utk multiple update nie. Korang leh download demo dia di mana mempunyai kecacatan yg sama [download here]

Share this post


Link to post
Share on other sites

Ataupun, apa command VBscript utk mimic user click button tertentu? Supaya every time user click button tertentu, seolah2 dia click button tu 2 kali.

<input name="btnCount" type="submit" id="btnCount" value="Count" /> 'nie html

<% 'nie VBscript

If Request("btnCount") <> "" Then

9xziv5lgv5kpjzv2jt.gifbla... bla.... bla...

9xziv5lgv5kpjzv2jt.gifCall btnCount.click <-- yg nie laa yg aku nak tau apa yg betul?

End If

%>

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...