SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    forum.
    I am in need of some JavaScript experts help here. I have looked all over the net and have not found what I am looking for.
    I am building pop-ups using the myWin.open('Etc','Etc',heigth, etc, etc,); function or new object call. The popups are linked to urls like so

    blah blah blah <a href = '#' onClick = new_win_function_call();>blah blah.

    Now I record what XY position the mouse was in when the link was clicked and I then write out the new window out in that position. So it writes a popup window based on where it was clicked. If a new link is clicked I close the window and start the process again of finding the position the mouse and drawing a new window.

    This is working well in most browsers. I have been asked to add some functionality which is the subject of my question. Once the pop up is drawn and a user moves it can I some how figure out if the window has been moved? Then when the user clicks on a new word not redraw the window based on the mouse click but on where the window was moved to previously?

    I know there is an onmove handler in netscape but I need to work in "of course" most browsers. And I have not been able to get the onmove handler to work anyway. Any help would be greatly apprecatied, I have been on this one for a while.

    Brett

  2. #2
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never heard of you being able to access the window coordinates or there being an onMove event.

  3. #3
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    instead of on move try onunfocus when they switch from the popup to the main window that event will fire allowing you to record the position in a cookie or something.
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums

  4. #4
    SitePoint Addict
    Join Date
    May 2000
    Posts
    313
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In Netscape Have you tried window_name.screenX and window_name.screenY to get the x and y coordinates . In Inernet Explorer try windowname.screenTop and window_name.screenLeft. Those should retrieve the position of the window.

  5. #5
    SitePoint Enthusiast
    Join Date
    Jul 2000
    Posts
    27
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the suggestion I will give them a try.

    Brett


Bookmarks

Posting Permissions

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