byronDaries
Posts: 1
Joined: Wed Sep 10, 2014 8:00 am

Opening IFrame on DIV click

I'm trying to open the IFrame popup when clicking a div but this far have been unsuccesful. The link opens as a normal hyperlink and not as an IFrame. How can this be achieved? (See code below)

<a href="ServiceUsageDetail.aspx" onclick="return hs.htmlExpand(this, { objectType: 'iframe',width: '1000' } )">
<div id="container2"></div>
</a>
MisterNeutron
Posts: 440
Joined: Sun Aug 18, 2013 11:20 am

Re: Opening IFrame on DIV click

See the barebones example: http://highslide.com/examples/iframe.html

Then please give us a link to your test page.
User avatar
RoadRash
Posts: 8249
Joined: Tue Jul 15, 2008 6:43 pm
Location: Fredrikstad, Norway
Contact: Website

Re: Opening IFrame on DIV click

Hi,

You shouldn’t put a div inside an anchor. You can add the onclick code directly to the div, and use the Highslide src option for the url you want to open.
Live demo: http://jsfiddle.net/tf842hko/
Hilde
Highslide Support Team

Overview of my Highslide sample pages: RoadRash.no

Return to “Highslide JS Usage”