Welcome to WebmasterWorld Guest from 54.196.144.100

Forum Moderators: incrediBILL

Message Too Old, No Replies

Trigger a popup when a user clicks on the page

     

script33

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

5+ Year Member



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?

script33

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

5+ Year Member



If its open in background tab so its very nice !

StoutFiles

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

WebmasterWorld Senior Member 5+ Year Member



I'm kinda confused about what you're asking...you want a popup but you also acknowledge that most people have popup blockers.

piatkow

12:23 pm on Jun 17, 2008 (gmt 0)

WebmasterWorld Senior Member piatkow is a WebmasterWorld Top Contributor of All Time 5+ Year Member



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.

rocknbil

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

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



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.

poppyrich

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

5+ Year Member



@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?