CAN YOU PLEASE HELP ME OUT W/ My FORM REFRESH PROBLEM???

H

HolaGoogle

Hi guys i'm back again!!
i'm having a small problem with refreshing my form after saving data
in my database! here's what i'm trying to do:
* In my UpdateDB.asp form i display my database records and the user
can make changes on whatever record he wants;
* after he'll have to save changes by hitting the save button on the
form;
* when i receive the "save" action, i update the database; set a
session variable that i'll use later to true ( Session("UpdateDB")=
TRUE) and DISABLE the Save Button.
*once i'm done with it i reset my session variable to false (
Session("UpdateDB")= FALSE); and WOULD LIKE to "ENABLE" the save
button; but i can't.

Everything works just fine but i can't "ENABLE" my save button???? how
can i refresh the page and get back the save button ?? i thought that
after resetting my session variable to false would help me but i don't
know how to use it??

Can you please help me with it???

Thanks!
 
P

Peter

You need to put a bit of code in to alter the Save button's disabled
property on the load event of the page such as...

<script type="text/javascript">
function initPage() {

document.form1.cmdSave.disabled="<%=LCase(Not(Session("UpdateDB")))%>
}
</script>

<body onLoad="initPage();">

If you get any probs with type Just alter Session("UpdateDB") to
CStr(CBool(Session("UpdateDB")))

Make sense?

Peter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,268
Latest member
AshliMacin

Latest Threads

Top