Confusingly, or perhaps not, I don't want it to postback, as it is loading a popup containing content, but the postback closes the popup.

The code is really simple, and its just a bog standard asp:Hyperlink. Theres nothing that I can see which could cause this, and I am mainly confused as to how and why it is being handled so differently by each browser.

The only thing I could think of was JS with

event.preventDefault();

Any one got any ideas what could cause this?

I am reloading an iFrame with a new source, which sits on the page, but it is forcing the entire page to postback on firefox only.

iFrame.attr('src', newSrc);

The rest of the code:

$('.button-try-glasses').on('click', function (event) {
var modal = $('#modal-container');
var newAsset = $(this).attr('data-asset');
var iFrame = modal.find('iframe');
var currentIFrameSrc = iFrame.attr('src');

var newSrc = currentIFrameSrc.substring(0, (currentIFrameSrc.lastIndexOf("/") + 1)) + newAsset;

iFrame.attr('src', newSrc);

Trylive.parse();

showPopup($(null), '#modal-container', true);

    event.preventDefault();
});

If I comment out the .attr line, it doesn't update the source, but it also doesn't postback and then close the component.

Related posts

Recent Viewed