want to create floating pop up

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    want to create floating pop up

    I have added this between <head> and </head>
    PHP Code:
    <script>
    // CREDITS:
    // Flying popup-window: very simple configuration 
    // by Peter Gehrig 
    // Copyright (c) 2010 Peter Gehrig and Urs Dudli. All rights reserved.
    // Permission given to use the script provided that this notice remains as is.
    // Additional scripts can be found at http://www.fabulant.com/fast/index.html
    
    // IMPORTANT: 
    // If you add this script to a script-library or script-archive 
    // you have to add a link to http://www.fabulant.com on the webpage 
    // where this script Script will be running.
    
    var popwindow
    var tisurl
    var tiswidth
    var tisheight
    var tistopposition
    var tisleftposition
    var pause=20
    var step=10
    var marginright
    var endposition
    var timer
    
    function openpopup(thisurl,thiswidth,thisheight,thistopposition) {
        tisurl=thisurl
        tiswidth=thiswidth
        tisheight=thisheight
        tistopposition=thistopposition
        tisleftposition=-tiswidth
    
        popwindow=window.open(tisurl, "newwindow", "toolbar=no,width="+tiswidth+",height="+tisheight+",top="+tistopposition+",left="+(tisleftposition)+"");
    
        marginright=screen.width
        endposition=marginright-thiswidth-10
        movewindow()
    }
    
    function movewindow() {
        if (tisleftposition<=endposition) {
            popwindow.moveTo(tisleftposition,tistopposition)
            tisleftposition+=step
            timer= setTimeout("movewindow()",pause)
        }
        else {
            clearTimeout(timer)
        }
    }
    </script> 
    

    and in footer
    PHP Code:
     <A HREF="javascript:openpopup('popupwindow.html','200','200','150')">Open Pop-up</A> 
    
    but now i have to create link for Google so whre should i have to add this url in above link. means i onclick it should show google.com in pop up

    #2
    PHP Code:
    <A HREF="javascript:openpopup('http://google.com','200','200','150')">google</A> 
    
    looks like it should do it.
    <?php
    include ('Ghost');
    if ($Post == true) {
    echo '

    sigpic
    alt='coding-talk.com!!' />';
    echo 'Sharing Is Caring!';
    } else {
    echo '

    alt='the username GHOST has been comprimised!' />';
    echo 'OMG SOMEBODY HELP ME!!';
    }
    ?>

    Comment


      #3
      hmmmmmmm moving window to the left o.O

      a lot easier code and less code would be:

      <a href="javascript: window.open('http://google.com', 'Google', 'toolbar=no,width=200,height=200,top=200,left=200' );">Click here</a>

      note: left and top dont work on all browsers.

      Comment

      Working...
      X