Javascript + IFrame + Chrome + Https = strange issue
- by GuiDoody
Using a modal plugin for jquery, I'm opening an iframe in a modal with a click event and setting the source attribute to a relative url (should be within https). The page containing the click is an authenticated ssl page.
In IE and Safari, this works as expected. In Chrome and Firefox, the source url is opened in http not https. If I set the source to an absolute url using https, same result.
Example:
// This doesn't work - resolves to http
$('.lnkViewDetails').click(function(e){
var src = "/ThePage";
$.modal('<iframe src="' + src + '" height="500" width="425" style="border:0" frameborder="no">');
});
// This doesn't work - also resolves to http
$('.lnkViewDetails').click(function(e){
var src = "https://MySite.com/ThePage";
$.modal('<iframe src="' + src + '" height="500" width="425" style="border:0" frameborder="no">');
});
Anyone know a way to get around this?