# javascript window.open & popup blocker



## llckll (Apr 8, 2004)

Hey all. this is my javascript code

each time it is being blocked by a pop up blocker. is there a workaround to solve this besides having users uninstall their popup blocker.

Thanks,
ck


----------



## Rockn (Jul 29, 2001)

Most pop up blockers have an allow pop-ups per site feature. You may want to rethink the whole pop-up functionality.


----------



## llckll (Apr 8, 2004)

this is not really a popup. i just want to open a new page when the user clicks on the register link.


----------



## Gazornenplat (Dec 30, 2004)

Just use an anchor tag, then.

Ian


----------



## llckll (Apr 8, 2004)

if i use an anchor tag.. i can change the style=text-decoration : none , but how can i change the hover font color?


----------



## Gazornenplat (Dec 30, 2004)

Put

within the HEAD tags

Ian


----------



## Shadow2531 (Apr 30, 2001)

Any good popup blocker will block the popup because it's automatic. The popup will go through if you put the window.open in the onclick attribute for some link. (Unless the person has chosen to block all popups).

As for the anchor tag's target attribute, that will be much better, but you shouldn't even do that. If someone wants to open the link in a new window/tab, they'll choose to. Do not try to take the choice away from the user. It won't help much anyways because there are simple ways of ignoring the target attribute.

If you want to make a popup automatic and get through, you can sometimes simulate clicks and use setTimeout() , but those methods are not even working in the newest popup blockers.


----------

