[iframe/flash/window.open] <- combinatie werkt niet?

Pagina: 1
Acties:

  • Explore
  • Registratie: Maart 2001
  • Laatst online: 08-04-2011

Explore

Op zoek naar werk

Topicstarter
Ik heb een html-pagina, waarin een Flash staat en er wordt een stukje javascript ge-include met een functie om een window te openen. In de Flash staan verschillende buttons die de javascript functie aanroepen. So far so good. Dit werkt.

Nu plaats ik bovengenoemde html-pagina in een iframe van een andere html-pagina en plots werken de buttons niet meer: er wordt geen nieuw window meer ge-opent.

Rara, hoe kan dit?

[ specs ] [ Tweaker gallery ]


  • André
  • Registratie: Maart 2002
  • Laatst online: 26-05 00:33

André

Analytics dude

Hoe open je dat window dan?

code:
1
  window.open("bla.html", "_blank");

  • Explore
  • Registratie: Maart 2001
  • Laatst online: 08-04-2011

Explore

Op zoek naar werk

Topicstarter
Vanuit Flash:

code:
1
getURL("javascript:openWin('http://someurl.com', 600, 500)");


In de html-pagina waarin de Flash staat wordt een stukje Javascript erbij gehaald, waarin deze functie staat:

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Opens a popup window width provided width and height or
// fullscreen if no dimensions are provided.
// Also optionally adds the menu and toolbars
function openWin(url, width, height, menus) {
    var awidth = screen.availWidth;
    var aheight = screen.availHeight;
    if (width != null && height != null) {
        var scrleft = (awidth > width)?((awidth-width)/2):0;
        var scrtop = (aheight > height)?((aheight-height)/2):0;
        var scrwidth = (awidth > width)?width:awidth;
        var scrheight = (aheight > height)?height:aheight;
        var features = 'width='+scrwidth+',height='+scrheight+',resize=no,top='+scrtop+',left='+scrleft;
    } else {
        if (navigator.userAgent.match(/msie/i)) {
            var features = 'fullscreen';
        } else {
            var scrwidth = awidth;
            var scrheight = aheight;
            var features = 'width='+scrwidth+',height='+scrheight+',resize=no,top=0,left=0';
        }
    }
    var strmenu = menus?",menubar=1,toolbar=1":"";
    window.open(url,'newwin'+Math.round(Math.random()*100),features+',scrollbars=1'+strmenu);
}


(excuus voor vernaggelen vd. layout)

[ Voor 9% gewijzigd door Explore op 11-12-2003 19:15 ]

[ specs ] [ Tweaker gallery ]