First put this code into your script:
<script>
function FUNCTION NAME()
{
*****
}
</script>
Then replace ***** with one of these:
alert("TEXT") window.location="URL" document.write="TEXT" any popup from the "popup" page any function name Then to start the function you can choose one of these:
<input type="button" value="TEXT" onClick="FUNCTION NAME()">
<body onload="FUNCTION NAME()">
<body onunload="FUNCTION NAME()">
<body onmousemove="FUNCTION NAME()">
<body onclick="FUNCTION NAME()">
<body onbuttonpress="FUNCTION NAME()">
Notice from rvalkass:
Again, correct BBCodes added. Also, please don't sign off your posts - that's what the info to the left of each post is for.