Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 12-20-2004, 08:32 AM   #1 (permalink)
veedee
Registered User
 
Join Date: Jul 2004
Posts: 4
veedee is on a distinguished road
pop up won't popup on exit

Hii ..
I have been building a database for my office, I use php mysql and connected via intranet.
I would like to have a popup window while user close the internet explorer/exit from database. I have copied a javascript script from http://www.javascript-coder.com/wind...dow-open.phtml ,below :


<html>
<head>
<script language="JavaScript">
function MyExit() {
window.open('thankyou.html');
}
</script>
</head>
<body onUnload="MyExit();">
your main page...
</body>
</html>

but when I close my ie window, there's no popup window appeared.
Could somebody explain what's wrong with this code? or something wrong with my ie (I have enabled javscript in ie option).

Thank you in advance
veedee is offline   Reply With Quote
Old 01-16-2005, 10:36 AM   #2 (permalink)
ender
Code Monkey
 
ender's Avatar
 
Join Date: Mar 2003
Location: Evansville, IN
Posts: 75
ender is on a distinguished road
Send a message via AIM to ender Send a message via Yahoo to ender
Just a guess, but first you may have some popup blocking software installed, which would certainly do the trick. Furthermore, the onUnload may be case sensitive, although it shouldn't be. You might try changing it to onunload instead. Moreover, you might try firing the function on another event, just to make sure that is working. Furthermore, you might try the onlcose event instead, even though that might not give you the desired behavior (seeing as the person would first have to close the browser, instead of just browse off of it) Please be aware that this is only a cursory look at your problem.
__________________
while(1) fork();
ender is offline   Reply With Quote
Old 03-16-2005, 02:08 PM   #3 (permalink)
webdes
Registered User
 
Join Date: Mar 2005
Posts: 6
webdes is on a distinguished road
The only problem I can see is that you have pop-up blockers installed. Your code looks fine to me, but I would suggest to try ender's solutions to see if it gives you the desired effects. Although, onclose event is not what you are looking for I gues...

Ross
webdes is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Brief popup under IE Belisarius HTML, XML, Javascript, AJAX 1 10-20-2003 02:03 PM
Exit in Java sno2dude Java 3 04-23-2003 06:59 PM


All times are GMT -8. The time now is 03:41 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting