|
-
May 8th, 2001, 01:24 PM
#1
Thread Starter
Lively Member
VB script Question
<P><INPUT name="Update_Records" onclick="Update_Records" type="Button" value="Update Data"></P>
<%
Function Update_Records_onClick()
Set Cmd = server.CreateObject ("ADODB.Command")
Set Cmd.ActiveConnection=MyConnection
...
...
...
Response.write "Records are updated"
%>
I want to use a command button, when clicked, should execute the function. Well nothing is happening, it is not calling the function. What am I doing wrong??
In the code for the button, onclick: I tried writing "Update_Records", Update_Records, Update_Records(), "Update_Records()".... Nothing worked
-
May 8th, 2001, 01:34 PM
#2
Frenzied Member
You are trying to do database updates from the client side. The database is on your server.
You will need to make your button call your page and put a conditional check to see whether the page has been called by itself or not, and if so, do the update in server side ASP code.
oOOo--oOOo
__ /\/\onte96
oOOo--oOOo
Senior Programmer/Analyst
MCP
[email protected]
[email protected]
Your results may vary.. some restrictions may apply.. pricing and participation may vary.. not available in all states.. professional driver closed course..quantities limited..
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|