Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Toggle Advertisments On and Off



5:16 pm on Mar 4, 2005 (gmt 0)

10+ Year Member

Does anyone know of a JavaScript that can toggle advertising on and off?
I know of a site that toggles Google AdWords on and off for their users - a cookie id's the user.
This site calls a function in another page to accomplish this:

<A HREF="noads.pl?status=1">Remove the ads from this site</A>

It can also turn the ads back on:

<A HREF="noads.pl?status=0">Reenable ads on this site</A>

I want to see if I can use this approach to automatically "cycle" ads on my pages.

Please and thanks in advance.



8:59 pm on Mar 5, 2005 (gmt 0)

10+ Year Member

But it's not javascript question. By clicking this link you tell server for your session make advertising or not whats all) server rerender your page with your conditions


12:20 am on Mar 6, 2005 (gmt 0)

10+ Year Member

But I wonder if there is a Java Script that can do this?


I know that some people disable JavaScript in their browsers. Is there any way that I can disable Java on a web page? Then I could turn JavaScript on or off, depending upon conditions, and this could turn all the advertising on or off.



6:17 am on Mar 6, 2005 (gmt 0)

10+ Year Member

But what type of advertising do you mean?
Any container like a div have display and visibility style options. You can make it hide by changing this properties with javascript and if somebody choose to show it you can again display it.
Sorry my english bad( and i can't understand clear what you want if you give an example i can give you solution. But then i go to google it redirects me to the russian google page, because i'm from Russia) and our google pages can be different)

Featured Threads

Hot Threads This Week

Hot Threads This Month