Page 1 of 1

window.onload function

Posted: Mon Oct 20, 2008 7:08 am
by priyanksharma
how to call two javascript function on window onLoad event
can any one help me out.............

Re: window.onload function

Posted: Mon Oct 20, 2008 7:20 am
by c0mrade
<script language="JavaScript">
function function1() {
window.confirm("Confirmation window");
}
</script>

<body onload="alert('hello'); function1();">

if that is what you seek ..

Re: window.onload function

Posted: Mon Oct 20, 2008 9:21 am
by dhrosti

Code: Select all

function init() {
  function1();
  function2();
  // etc...
}
 
window.onload = init();

Re: window.onload function

Posted: Tue Oct 21, 2008 7:51 am
by priyanksharma
i m try the same code and its working fine but "undefiend" is null or not an object error occurs javascript error occurs....Please help me out