Menu
Not sure what I’m doing wrong. I am just attempting to put some info into some javascript variables, but I must be misunderstanding how to have multiple variables in a function.
<script language=”JavaScript”>
var stuff1 = “Alert Message here!”;
var stuff2 = document.getElementById(“styled_popup”).style.display=”block”;
window.onbeforeunload = confirmExit;
function confirmExit()
{
return [stuff1,stuff2];
}
</script>
Am I putting the sytax correctly? Because I get no return when I leave the page.
However, if I put the data (from the variables) directly into the return[] portion, then it works.
Any thoughts?