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

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -