Button and Events 
Author Message
 Button and Events


I'm having trouble handling events for input type button.
Here's a snippet of the code

Sub DoSomething
End Sub

<% Do While Not rs.EOF %>
            <INPUT TYPE=BUTTON VALUE="Click Me" OnClick="DoSomething">
<% Loop %>

As you can see the loop will generate a button for each record in the
recordset but when executed only
the first button when pressed will call DoSomething while the rest of the
buttons when pressed does nothing.

I've inserted a MsgBox ...  in the DoSomething subroutine so that is how I
know only the first button when pressed DoSomething gets executed but when
pressing the rest of the other buttons the MsgBox does not appear.

There must be something that I'm doing wrong.  Help is greatly appreciated.

Willie Tu

Sat, 01 Sep 2001 03:00:00 GMT  
 Button and Events
Well the only thing I see wrong is that your code will never work, because
just before the <%loop%> you need an <%rs.MoveNext%>

Sat, 01 Sep 2001 03:00:00 GMT  
 [ 2 post ] 

 Relevant Pages 

1. Simulating button-click events using code

2. Detecting the Back button click event....

3. Executing the button onclick event when the enter key is pressed

4. Common Dialog box in button on_click event

5. Simulating button-click events using code

6. button click event executed TWICE

7. Button and Events

8. Button click event not firing with Enter Key

9. Word com add-in and button click events

10. simulating cmd button click event

11. Button Click Event Not Firing !

12. All button _Click events broken......


Powered by phpBB® Forum Software