如何使新窗口函数在iframe的父页面中打开

时间:2015-02-10 14:38:01

标签: javascript html iframe

我试图让这个函数在页面中打开窗口,该页面包含iframe,即父页面。

这是功能:

function <?php echo $_htmlId; ?>_get_office_locator() {
    url = '<?php echo Mage::helper('extensa_econt')->getOfficeLocatorUrl(); ?>' + '&shop_url=<?php echo Mage::getBaseUrl(); ?>';

    if ($F('<?php echo $_htmlId; ?>:office_city_id')) {
        url += '&address=' + $('<?php echo $_htmlId; ?>:office_city_id').options[$('<?php echo $_htmlId; ?>:office_city_id').selectedIndex].text;
    }

    <?php echo $_htmlId; ?>_win = new Window({url: url, width: 1000, height: 800, destroyOnClose: true, minimizable: false, maximizable: false, recenterAuto: false, zIndex:9999});
    <?php echo $_htmlId; ?>_win.showCenter(false, 50);
}

此功能在iframe中打开新窗口,但我想在页面中的iframe外面打开它,该页面调用/持有iframe即父页面。

我如何通过jQuery / JavaScript制作这个?

0 个答案:

没有答案