tags:

views:

84

answers:

2

I guess this is possible, but I don't know how.

<a rel="width[640];height[480];autostart[true];loop[true];title[Google]" class="jcepopup" href="http://www.google.nl"&gt;Aanbieding&lt;/a&gt;

Can it be done linke this?

<body onload="javascript: laden()">


<script type="text/javascript">

  function laden()

  {

  window.open('http://www.google.nl rel="width[640];height[480];autostart[true];loop[true];title[Google]" class="jcepopup"', 'blablabla', 'width=720', 'heigt=500');

  }

A: 

Yes, but you don't need the javascript: in your onload, you can just do:

<body onload="laden();">
Chris Pebble
A: 

Most browsers these days block pop-ups because of this very use. There are a couple of generally accepted ways to get around this (I hope lightning does not strike me down).

  1. Open the pop-up after the user clicks on something
  2. Embed some Flash and use ActionScript to open it

The Flash method is renowned enough that you can find several links about it online. If you can shove some Javascript into some container, you can essentially bypass the restrictions (if you get creative). Windows Media files, for instance. Movies are great for opening pop-ups.

I'm going to leave this intentionally vague, as I don't want to be responsible for the proliferation of more pop-ups.

Pestilence
haha, popups are indeed very lame, but I need to make a xmas greeting for a client :) Thanks for your replies.
Chris
Your client is ruining Christmas
Justin Johnson