how to call a function of javascript in jsp without any event -
how can call javascript function without event. have session variable namely x. need call javascript function demo() if session variable not null.
<% if((string)session.getattribute("x")!=null) { %> <script type="text/javascript"> demo(); </script> <% } %>
let me know right way of calling demo function.
if understand correctly, use onload event. at
http://www.javascriptkit.com/javatutors/event3.shtml
Comments
Post a Comment