Quote:
Originally Posted by ltsf
inbetween javascript tags like this
<script language="javascript">
function myFunction()
{
}
windows.onresize = myFunction();
</script>
?>
|
No.. not quite.
Code:
windows.onresize = myFunction();
Would actualy execute the myFunction() routine and assign what it returns to the onresize event.
Code:
function myFunction ()
{
alert('We were resized!');
}
window.onresize = myFunction;
That should work. Depending on the size of that function this might look cleaner in your code:
Code:
window.onresize = function () { alert('We were resized!'); };