Welcome to WebmasterWorld Guest from 54.196.243.192

Forum Moderators: incrediBILL

Message Too Old, No Replies

Trigger a popup when a user clicks on the page

     
3:07 pm on Jun 16, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:July 8, 2007
posts:72
votes: 0


How we can insert a popup in our page that when a user click on the page (any where) so popup open !

Because today all browsers have popup blocker and any user don't see popups automaticaly !

So we must use this method !

Can you help me?

3:08 pm on June 16, 2008 (gmt 0)

Junior Member

5+ Year Member

joined:July 8, 2007
posts:72
votes: 0


If its open in background tab so its very nice !
3:13 pm on June 16, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member 5+ Year Member

joined:May 6, 2008
posts:2011
votes: 0


I'm kinda confused about what you're asking...you want a popup but you also acknowledge that most people have popup blockers.
12:23 pm on June 17, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month

joined:Apr 5, 2006
posts:3284
votes: 12


If you just want a new window to open on a link then use the target attribute either through html or javascript.

I haven't come across a pop-up blocker so far that stops you opening a link in a new window.

5:48 pm on June 17, 2008 (gmt 0)

Senior Member

WebmasterWorld Senior Member rocknbil is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Nov 28, 2004
posts:7999
votes: 0


when a user click on the page (anywhere)

For starters, you could try

<body onClick="newWin();">

Where newWin() is a Javascript function that opens a new window. I don't know if this qualifies as "anywhere" so you might have to apply the same to your links. Add a generic unobtrusive function that applies to both body and all links.

Not a great idea for your end users, but if you must, you must.

7:36 pm on June 18, 2008 (gmt 0)

Full Member

5+ Year Member

joined:Sept 5, 2007
posts:264
votes: 0


@script33:

Are you looking for a pop-up that will work even if Pop-Up blocking is enabled?

If so you are looking for what is often called a DHTML popup.
It uses javascript to manipulate the DOM to produce a pop-up effect that can't be blocked.

I this what you're looking for?