This topic is locked
[SOLVED]

 New Button Bind

1/8/2013 9:50:13 PM
PHPRunner General questions
W
wildwally author

From the list page I have a new button and I want to bind it so that when clicked it will act as the edit selected button - I've tried numerous attempts with no luck so I'm doing something wrong.
this does nothing



$("#New_Button_26").bind("click", {page: this}, function(e){
alert("Bind Click");
});


THis would mean i need to hide the provided edit select? so the user doesn't use it.
Or is there a way to have the edit selected run/execute a series of code on js onload and then do as it normally does?
Thanks

C
cgphp 1/9/2013

Remove your code and add the following code to the "Before client" event of the new button:

$("a[id^='edit_selected']").trigger('click');