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