开发者

Firefox Addons: Unable to open new page in document.popup

I have a firefox addon which opens a document.popup window. When I click a link within the popup, I want to call a javascript function which displays an alert within the popup itself. When I try onCLick(onY()); the alert comes only after I close the popup.

'<div id="SearchLiteDef-yahoo" style="'+
            'font-family:arial; font-size: 12px; float: left; cursor: auto; background-color: #DDD; '+
            'margin: 0 3px ' + margin + 'px; '+
    开发者_高级运维        'padding: 0 3px; -moz-border-radius: 2px; width: auto;' +
            'height: ' + windowButtonHeight + 'px; '+
            'font-size: 12px; '+
            'line-height: ' + windowButtonTextSize + 'px; '+
            'font-weight: bold"><a href="#" onClick="onY(document.popupNode);" style="text-decoration: none;">Y!</a></div>'+
        ''+

This is the section which calls the popup. I want to call the function

this.onY = function(e){
alert("Hello");
}

The alert comes only when I close the popup window. I want the alert to come inside the popup window.

Thanks, Kiran


I think the problem is that you try to open a popup within a popup. You can only have 1 popup at any given time AFAIK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜