PDA

View Full Version : Java Script Problem - the sequel



harrythehound
01-15-2004, 12:46 PM
After posting my first stupid question and getting such a quick response, I thought I'd try again.

This time I'm having problems with a pop-up window java script on my home page:

http://www.min-eng.com

it's only supposed to pop up once ever for each visitor, but it pops up every time.

Why?!?

Thanks for any help....

wclew
01-15-2004, 02:46 PM
Harry,
I just looked at your site and it worked correctly for me. I only have IE 6.0 on this machine, however.
Good luck,
Dennis

Nargule
01-16-2004, 11:06 PM
The pop-up opend only once for me in IE6 and Netscape6 on WinXP.

When you are viewing the page, are you looking at it from the server or locally on your hard drive?

mikmik
01-17-2004, 01:41 AM
Make sure that cookies are allowed, and not being deleted between sessions either.
If browser is not 'cookie friendly', then the popup will launch every time you visit, because it uses a cookie on the client browser to remember visits.

I just checked, and the script works in IE6. It only reappears if I delete the cookie. Your script is working properly!

paulhiles
01-18-2004, 11:20 AM
Hi Amanda,

Mik made the important point about the visitor's browser being able to accept cookies, if they don't, then the popup will appear every time they visit your homepage.

I think the script could be improved; after the popup loads, I click the link in the popup, and a new window (call.html) opens in a new location. So I now have three separate windows open. The homepage, the popup, and the target page! :O

A script (http://simplythebest.net/scripts/javascript_109.html) I came across on simplythebest.net seems to work a lot better.
"An auto close popup window script. The popup window automatically closes once you click on a link. The script shows the new page in the main window."

I realise you've chosen to use a popup to attract people's attention, but remember a lot of site visitors get extremely irritated by popups.. especially if they're loading automatically! - hence the popularity of popup blockers. So possibly the best solution would be to have a "feature" spot on your homepage to highlight particular events.

Hope that helps,

Paul

harrythehound
01-19-2004, 09:35 AM
Thanks everyone

I have a sneaky suspicion that my boss (who reported that the ad kept popping up all the time)probably has cookies blocked. I'll have to check his computer for him.

Paul - that looks like a great script, and just what I need. Thanks a lot.