Hi,
I'm writing a websocket application but I was wondering: a soon as I connect my webpage to the server the click events of any of the HTML buttons trigger a method on the server.
How would I handle the button clickevent in JQuery (client-side) and call a method on the websocket from within this JQuery event ?
This does not seem to work:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
This code is working neither:
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
Thanks
			
			I'm writing a websocket application but I was wondering: a soon as I connect my webpage to the server the click events of any of the HTML buttons trigger a method on the server.
How would I handle the button clickevent in JQuery (client-side) and call a method on the websocket from within this JQuery event ?
This does not seem to work:
			
				B4X:
			
		
		
		$(document).ready(function() {
  b4j_connect("/overview");
  $("#enter").off();
  $("#enter").click (function() {
    alert('foo');
  });
});
	This code is working neither:
			
				B4X:
			
		
		
		$(document).ready(function() {
  b4j_connect("/overview");
  $("#enter").unbind("click");
  $("#enter").bind ("click", function (e) {alert('foo');});
});
	Thanks
			
				Last edited: