javascript openNewWindow & swapimage

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
TrOn
Beginner
Beginner
Posts: 5
Joined: Sun Jul 28, 2002 12:11 pm

javascript openNewWindow & swapimage

Post by TrOn »

I've searched thru the forum and haven't found an answer for this yet. I have a menu like this:

Code: Select all

function openNewWindow(winURL,winWidth,winHeight,winConfig){
     mmConfig=""
     mmConfig="width="+winWidth+","
     mmConfig+="height="+winHeight+","
     mmConfig+=winConfig
     var mmWin=open(winURL,"",mmConfig);
     mmWin.focus();
}

Code: Select all

,"<img src=but1.gif border=0>","javascript:openNewWindow('link.html') swapimage=but1_f2.gif;",,,0
The problem is, that the second swapimage (in this case but1_f2.gif) isn't shown. The link works, but I guess the function openNewWindow stops the execution of swapimage. Any ideas on how to fix it? :)
TrOn
Beginner
Beginner
Posts: 5
Joined: Sun Jul 28, 2002 12:11 pm

Post by TrOn »

Heh, fixed it.

Code: Select all

,"<img src=but1.gif border=0>","show-menu=top3","javascript:openNewWindow(\"odpiranje_windowopen.txt\") swapimage=but1_f2.gif;","",0
Fantastic menu BTW! One of the few, that supports almost everything (frames, noframes,..) and also has a working pagecheck routine.

Keep it up!
Post Reply