how can I run $(document).ready(function () { ....
function inside the user controlI am dynamically load my use control,what I wanan do is that whenthe load usercontrol,register my some javascript function via ready function.
here is the my javascript inside the my usercontroler,
<script language="javascript" type="text/javascript">
//register this script when the page load
var MainFunction;
$(document).ready(function () {
MainFunction = function (Plaka) {
alert(Plaka);
}
});
</script>
and I amtring to call Main function via my button which is the sam place of the ready function inside the usercontroler.
<ext:Button runat="server" ClientIDMode="Static" ID="btnMusteriEkle" Text="Yeni müşteri ekle">
<Listeners>
<Click Handler="MainFunction(#{txtPlaka}.getValue())"> </Click>
</Listeners>
</ext:Button>
I am trying to call MainFunction(#{txtPlaka}.getValue()) like this but not working.I am getting the error MainFunction is not defined.
emmm noone help me??!