Is it possible to show a AJAX modalpopup by javascript and at the same time set the onclick attribute for a button in the modalpopup, I can´t get it to work and i think it´s because the modalpopup div has display: none when doing the call to the javascript function, am I right?
To clarify why I'm setting the button onclick attribute to another javascript function that doing __doPostback is because i don´t think it´s possible to set a buttons CommandName and CommandArgument by javascript.
function showModalPopupAndSetCancelButtonOnlick() {
$find('mpeLogMessagePopupBehavior').show();
$get('btnLogMessageCancel').onclick = function() { __doPostBack('btnLogMessageCancel','testArgument'); };
}
Now it works! Couldn´t do this because the function is in a external javascript file.
Instead it worked if i apply the clientID manually in my function