1
I have an Asp button
<asp:button ID="cmdAvancarEndereco" runat="server"
cssclass="btn btn-success btn-lg" text="Avançar >">
</asp:button>
that has an event of the VB
trailer in the click
Private Sub cmdAvancarEndereco_Click(sender As Object, e As EventArgs)
Handles cmdAvancarEndereco.Click
'evento
End Sub
but at the click of this button, I need to run before the event cmdAvancarEndereco_Click
a javascript event:
var getCardToken = function () {
// evento
}
tried to put it unsuccessfully it will go straight to the server:
document.getElementById("ContentPlaceHolder1_cmdAvancarEndereco")
.addEventListener("click", getCardToken);`
Some solution?
Put Onclientclick on the button and call the function! Here in this mine question You can see how the button looks!
– Marconi
Try this and see if it solves.. http://answall.com/a/181725/64073
– rLinhares
Face unfortunately I do not see as duplicate, because the question there has not to do with how to execute first and yes which to execute first and no solution was given equal here, the questions are different
– Jhonatan Jorge de Lima