View Full Version : fire a func automatic
Hi All,
how to fire a function automaticly ?
I can run a function like:
<BODY onload="myfunc()" >
I like to run:
<p> we run myfunc now<p>
myfunc()
TIA
Ron
beetle
08-16-2002, 05:30 PM
Uhh, what?
You can run functions via javascript from anywhere in the HTML as long as you use a proper event handler or enclosing it in <script></script> tags...<span onClick="myFunc();">Click here for function</span>
-OR-
<script>
myFunc();
</script>
thank you beetle,
to also know how to check if a window is still open?
win9.windows.open(....)
if I reload I need something like
if win9 is open
.....
else
....
tschau
Ron
beetle
08-16-2002, 06:02 PM
<script>
var newWin;
</script>
<span onClick="newWin = window.open('page.htm','newWin','menubar, scrollbars, location');" style="cursor:hand">Click here</span><br>
<input type="button" value="Check Pop" onClick="alert(newWin.closed)">
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.