• grazza

    (@grazza)


    This might not be so trivia for someone more experienced then me. I have used a Javascript in my theme to create a new window with some video. See code below. It is nothing new and it works on other sites.

    function NewWindow(url, windowName, w, h, scroll) {
    var winl = (screen.width – w) / 2;
    var wint = (screen.height – h) / 2;
    winprops = ‘height=’+h+’,width=’+w+’,top=’+wint+’,left=’+winl+’ — ,scrollbars=no ,resizable=no’;
    win = window.open(url, windowName, winprops);
    if (parseInt(navigator.appVersion) >= 4) {
    win.window.focus();
    }
    }

    This funtion is called from the code below, which resides in my wordpress post. (agian nothing new and it works elsewhere)

    onMouseUp=”NewWindow(‘http://www.thirtyfiveandsunny.com/work/wp-content/uploads/movies/all_he_needs_medium.mov’,’thirtyfive.and.sunny’,480,376);”>

    It all works fine accept the window displays the url of the movie instead of the window name parsed from the ahref.

    Am I doing something wrong here? I hope someone can explain.

    cheers

    Graeme

The topic ‘javascript popup window name’ is closed to new replies.