how to call a javascript function in grails 2.2.2 -


i trying call javascript function not working.. please me out

javascript code:

<script type="text/javascript"> $(document).ready(function(){     function confirm(){             alert('hello world');     } }); </script> 

textbox code:

<div class="full-filed">             <h3>confirm password:</h3>         </div>               <g:passwordfield name="confirm" value="" class="logintxtbox" placeholder="password" onclick="confirm();"/> 

your function available inside ready(..) function. have define funciton in main context:

<script type="text/javascript"> function confirm(){     alert('hello world'); } </script> 

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -