Results 1 to 7 of 7

Thread: Basic question (SOLVED) Thanks!

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2004
    Location
    Earth 4 now.
    Posts
    27

    Basic question (SOLVED) Thanks!

    I use this structure when updating or inserting stuff to the database. I've got a problem with it though when I tell them "no good input" all previous input is lost. I tried adding some asp(vb) to the javascript controle function, but I don'tknow how to add the conclusion(True /False) that I have in asp to the Javascript function return.

    <!--#include file="include/connect.asp"-->
    <% Call CheckSession()
    If Request.Form("add") = "1" then

    {check something out of database (like if the reccord doesn't already exist.)}
    {if ok do database change}
    {else tell them not good}
    end if
    %>

    <html>
    <head>{blablabla}

    <SCRIPT LANGUAGE="JavaScript">
    function controle()
    {
    [check something]
    }
    </head>
    <BODY {blablabla}>
    <form name="form" method="post" action="UpdateAccount.asp?aid=<%=Request.QueryString("aid")%>">
    <input type="hidden" name="add" value="1">

    {input stuff}

    <input type="button" name"update" value="Update" onClick="onClick="if (controle()) parent.body.form.submit">

    </form>
    </body>
    </html>

    How do you guys do that?

    Thanks
    Last edited by ShotokanTuning; Jul 19th, 2004 at 05:48 AM.

Posting Permissions

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



Click Here to Expand Forum to Full Width