Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    25

    Unanswered: Commit transaction in the same page

    Can somebody give me an idea. Can I do the transaction in the same page without post to another page. The code I type myself. I know that using dreamweaver it can be done but how if I type it myself. what should i put at the action form?..

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    You just post back to the same page....

    You need to set up logic in your page to determine if you need an update/insert/delete or what ever it is your are trying to do.

  3. #3
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    25

    Reply rokslide

    Originally posted by rokslide
    You just post back to the same page....

    You need to set up logic in your page to determine if you need an update/insert/delete or what ever it is your are trying to do.
    Can you explain in detail where should I put the insert statement in the same page . Is it after the form statement.

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    something like this....
    Code:
    <%
    if request.form("btnInsert")="Insert" then
      ' do insert
    elseif request.form("btnDelete")="Delete" then
      ' do delete
    end if
    %>
    <html>
      <body>
        <form>
        do stuff
        <input type="button" name="btnInsert" id="btnInsert" value="Insert">
        <input type="button" name="btnDelette" id="btnDelete" value="Delete">
        </form>
      </body>
    </html>
    Last edited by rokslide; 04-21-04 at 04:25.

  5. #5
    Join Date
    Apr 2004
    Location
    Malaysia
    Posts
    25

    Thank you rokslide

    Thank you rokslide for helping me solving my problem.. you are very nice guy ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •