Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,

I want to automatically trigger the save button in popup.

C#
showBootstrapModal('/AgendaEvent/Edit/', {
                               id: event.id,
                               title: event.title,
                               start: event.start.format(),
                               end: event.end.format(),
                               top: (jsEvent.clientY - 240) + 'px',
                               left: (jsEvent.clientX - 260) + 'px',
                               buttons: {
                                   Save: function () {
                                       $('#<%=agenda-event-create %>').click();
                                       $('#modal-wrapper').modal('hide'); //Test ModaL POPUP
                                   },

                               }
                           })


But the save button is not triggering.

Thank you
Posted
Comments
Pradip R 13-Nov-14 8:38am    
Are you trying to submit when the popup opens?
Nathan Minier 13-Nov-14 10:00am    
You're better off calling the function invoked by the click event than the click event itself, and passing the event variables to it. Mixing markup and JS is always, always a headache.

1 solution

You need to call the click event handler in the load event.You can try start:
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900