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

window.onload vs <body onload=""/>


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -