You are currently viewing the Dreamweaver (all versions) section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
I was wondering if it is possible to automatically update or insert a record after executing a function by using the dreamweaver mx update record behavior, but without using any server side control (without the user clicking a submit button or any other command). This web page will only request two cookies and insert the value on a table.
I have try different ways but it seems that the values of my hiddenforms that I use to insert the records are deleted before executing the Insertar.Expression.Doinit()
'''''This is where I initialize the cookies
<script runat="server">
Public PatientID as HttpCookie
Public waist2 as HttpCookie
Public wasitstring as string
Sub Page_Init(Src As Object, E As EventArgs)
PatientID = request.Cookies("pPatientID")
waist2 = request.Cookies("pWaist")
End Sub
</script>
'''''This is where I assigne the cookies to a hidden form and then call the INSERT behavior to insert the values to the database
<script runat="server">
Sub Page_Load(Src As Object, E As EventArgs)
hf_PID.Value= PatientID.value
hf_PID2.Value = waist2.value
I have also tried to put all the code under the Sub Page_Load(Src As Object, E As EventArgs) or Sub Page_Prerednder(Src As Object, E As EventArgs) functions but nothing happens.
If I use the UPDATE RECORD BEhavior instead of the INSERT RECORD, it will take me to the success page but without updating the hidden forms values on the database.
Do you have any suggestions? DoI need to include something else besides insertar.Expression = "true" ?