Results 1 to 5 of 5

Thread: vbworld's flying windows

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    didn't decide yet
    Posts
    566

    vbworld's flying windows

    how can i make a window that flies around like the one wbworld has. Also if possible i want that window to stay always on top of other windows
    Come and get our ISDN CallerID http://www.3wm.biz

  2. #2
    Addicted Member
    Join Date
    Jul 2002
    Location
    Brussels, Belgium
    Posts
    139
    The cool thing about client-side script, is that you can always have a look at it and copy paste it if you want.

    Anyway this is the code that vbworld uses:

    <script>
    var popwindow
    var popwindowwidth=200
    var popwindowheight=150
    var popwindowtop=200
    var popwindowURL='promotion.aspx'
    var waitingtime=4
    var pause=20
    var step=40
    var popwindowleft=-popwindowwidth-50
    var marginright
    var pagecenter
    var timer
    waitingtime= waitingtime*1000

    function showWindow() {
    popwindow = window.open(popwindowURL, 'popwindow', 'toolbar=no,width='+popwindowwidth+',height='+popwindowheight+',top='+popwindowtop+',left='+(-popwindowwidth)+'');
    if (document.all) {
    marginright = screen.width+50
    }
    if (document.layers) {
    marginright = screen.width+50
    }
    pagecenter=Math.floor(marginright/2)-Math.floor(popwindowwidth/2)
    movewindow()
    }

    function movewindow() {
    if (popwindowleft<=pagecenter) {
    popwindow.moveTo(popwindowleft,popwindowtop)
    popwindowleft+=step
    timer= setTimeout('movewindow()',pause)
    }
    else {
    clearTimeout(timer)
    timer= setTimeout('movewindow2()',waitingtime)
    }
    }

    function movewindow2() {
    if (popwindowleft<=marginright) {
    popwindow.moveTo(popwindowleft,popwindowtop)
    popwindowleft+=step
    timer= setTimeout('movewindow2()',pause)
    }
    else {
    clearTimeout(timer)
    popwindow.close()
    }
    }


    </script>

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    To be honest, I find pop-ups (sliding or otherwise) annoying and will, if possible, avoid sites that employ them. It seems I will just have to put up with the one on this site.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2001
    Location
    didn't decide yet
    Posts
    566
    ccoder the client asked for it so i have to deliver
    Come and get our ISDN CallerID http://www.3wm.biz

  5. #5
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    Originally posted by tina104291325
    ccoder the client asked for it so i have to deliver
    Well ... the customer is always right!

    Sorry if it sounded like I was saying you shouldn't do it. I was just venting. I usually wrap a post like that with <rant></rant> tags to hopefully inject a little humor. I just forgot this time.

    BTW, does anyone else get an error on line 59 - Access error when they try to close Karl's sliding window?
    Last edited by ccoder; Sep 18th, 2002 at 11:13 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width