I have a normal marked up HTML page where an user can choose one option from 3 radio buttons.
[o] Option 1
[o] Option 2
[o] Option 3
However, when they click on the radiobutton for option 2, a pop up must open displaying a page.
I installed Fancybox (which already works! for those who not know it’s a lightbox alternative) that opens a page in an iframe.
I have a text test link on the site:
<a id="example1" href="http://www.url.com/pages/newpage.php?iframe">test</a>
So basically, when I now click on “test”, Fancybox opens displaying newpage.php.
This ALREADY works. But now I need to make it so that when you click radio button for option 2, it opens that page. I tried:
<input type="radio" id="example1" name="wnf" value="geven" onclick="window.open='http://www.url.com/pages/newpage.php?iframe'" /> Option 2
This does not work. Idea’s?
Thanks in advance.
You need to attach fancybox to your radio button, and set the source of the image to show in the options, see an example here: