A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2008 yearOpening Javascript based popup ads on the same page - page 1
User InfoPosts
Opening Javascript based popup ads on the same page#1
I own an image hosting site and would like to generate one popup per visitor per day. The easiest way for me to do this was to write a php script that called subdomains, like ads1.sitename.com
ads2.sitename.com

unfortunatly most of my advertisers want to give me a block of javascript code to use rather than a direct link, so I can(t just make the individual subdomains header redirects.I(d rather use the subdomains that way I can manage multiple advertisers without changing any code on page, just code in my php admin page. Any ideas on how I can stick this jscript into the page so I don(t need to worry about a blank ads1.sitename.com as well as the popup coming up?

posted date: 2008-09-17 11:48:00


Re: Opening Javascript based popup ads on the same page#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2008-09-17 11:48:01


Re: Opening Javascript based popup ads on the same page#3
I doubt you(ll find much sympathy for help with pop-up ads.

posted date: 2008-09-17 12:09:00


Re: Opening Javascript based popup ads on the same page#4
At the risk of helping someone who wants to deploy popup ads (which is bound to fail due to most popup blockers anyway), why can(t you just have the subdomains load pages that load the block of Javascript the advertisers give you?

posted date: 2008-09-17 12:15:00


Re: Opening Javascript based popup ads on the same page#5
How about appending a simple window.close() after the advertising code? That way their popup is displayed and your window closes neatly.I(m not sure that I(ve ever had a browser complain that the window is being closed. This method has always worked for me. (IE, Firefox, etc.)

posted date: 2008-09-17 12:17:00


Re: Opening Javascript based popup ads on the same page#6
Hey, cut the guy some slack. Popups might not be very nice, but at least he(s trying to reduce the amount of them. And popup blockers are going to fix most of it anyway. In any case, someone else might find this question with more altruistic goals (not sure how they(d fit that with popups, but hey-ho).I don(t quite follow your question, but here(s some ideas:Look into Server Side Includes (SSI) to easily add a block of javascript to each page (though you could also do it with a PHP include instead)Do your advertiser choosing in your PHP script rather than calling the subdomainsDecipher the javascript to work out what it(s doing and put a modified version in the subdomain page so it doesn(t need an additional popup. Shouldn(t be too hard.

posted date: 2009-01-07 12:55:00


Re: Opening Javascript based popup ads on the same page#7
I'm surprised you'd say that really, the cost of running such a website has made it almost a necessity for most imagehosts to run them. Most large imagehosts use popups and I'm asking for help to make it only appear 1 time for each visitor to lesson the annoyance.

posted date: 2009-01-07 13:14:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.