SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Jan 3, 2011, 13:34 #1
- Join Date
- Nov 2010
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
calling a sub (function) from onclick button
Happy New Year.
I am populating an html table with database records. Users may click on a check box and update one of the columns data. A button click will capture these data and update my table.
So my questions is.. is it possible to call vbscript fuction on button onclick ?
So it will be like but I get an error. What I am doing wrong?
Any suggestion is greatly appreciated.
<%
Sub butnupdate
response.write( "Help" )
End Sub
%>
<input type="submit" name="updtcomment" value=" Update Comments" onclick="<%butnupdate%>">
-
Jan 3, 2011, 16:28 #2
- Join Date
- Nov 2010
- Posts
- 27
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Found a way.
Thank you.
-
Jan 24, 2011, 11:43 #3
- Join Date
- Dec 2008
- Location
- Brussels
- Posts
- 377
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
like this:
onclick="VBscript:myVBFunction('parameter')"
-
Jan 24, 2011, 23:34 #4
- Join Date
- Jun 2007
- Posts
- 691
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
ASP runs on the server.
onclick events run on the client.
You can call a serverside function from the client via ajax.
I recommend you discuss this in a javascript forum which is more applicable than here in ASP forum
-
Jan 25, 2011, 00:00 #5
- Join Date
- Jul 2005
- Location
- West Springfield, Massachusetts
- Posts
- 17,290
- Mentioned
- 198 Post(s)
- Tagged
- 3 Thread(s)
Big Change Coming Soon - if you want your PMs save them now!
What you need to do to prepare for our migration to Discourse
A New SitePoint Forum Experience: Our Move to Discourse
Bookmarks