SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi

    I have reviewed the following:

    http://www.sitepointforum.com/showth...threadid=17154

    There are some pop up windows that contain enlarged jpg or gif.

    When I first reviewed, some of the graphics popped correctly. Others did not. Later, I tried the pictures again and they all worked.

    I tested NN also and it worked fine.

    Westmich did the same test and the graphics failed.

    His post and mine were three minutes apart. Both failures are on IE!

    Does anyone know of a javascript that could do this? Please visit the thread and view the problem. Your comments are most important.

    Thanks

  2. #2
    SitePoint Addict gthorley's Avatar
    Join Date
    Oct 2000
    Location
    Canada
    Posts
    392
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Further to the above message I posted a query on comp.language.javascript and got this reply which makes it seem like it is a timing problem

    Message
    I am having reports that when images are clicked to see a larger image
    in a popup window on our site that the window is not opening for some
    users of IE5.5.
    The following is the code used with an example of the call
    <!--
    function win(fileName) {
    myFloater =
    window.open('','myWindow','scrollbars=no,status=no,width=550,height=500,top=15,left=225')
    myFloater.location.href = fileName;
    }
    //-->
    <a href="javascript:win('landscapes/mountaintarn.html')"><img
    src="landscapes/S_mountaintarn_10x15.jpg" width="240" height="156"
    border="0"></a>

    Reply
    You're doing way more work than you need to:

    You don't need to variable = window.open(), then variable.location.href=variable.

    Just do

    myFloater =
    window.open(fileName,'myWindow','scrollbars=no,status=no,width=550,height=500,top=15,left=225');

    This will most likely fix your problem, because it was probably a timing thing. You were
    changing the href of a window that was still opening, why not just open the new window with
    the correct URL to begin with.



    My problem is I am to green to know just what to do to try this suggestion. Where do I put the "just do" , where the link is associated with the picture? and is that all I need, wouldn't I need something in the javascript section?


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
  •