Jump to content

New solution for my javascript in safari browser


Recommended Posts

Dear all,I need coding for closing a pop up window, I wrote a separate button to close the window, What i need is if i click the close in window, it should call the same function that i wrote for button clicking.the code i wrote is<script language="javascript"> var winobj; //window.onunload=displayMessage; winobj = window.self; window.onunload=displayMessage; function displayMessage() { document.write('<p style="display:none;"><FORM action="main.php" name="logout" method="post" target="_parent">'); document.write('<INPUT type="hidden" name="session_id" value="<?=$session_id?>">'); document.write('<INPUT type="hidden" name="include" value="9">'); document.write('<INPUT type="submit" class="buttons" value="<?=$lng["logout"]?>">'); document.write('<FORM></p>'); document.logout.submit(); alert('You are Quiting CramLIVE now...'); winobj.close(); } </script>please find solution.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...