Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Dec 2004
    Location
    Pennsylvania
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question window.open(...) WORKS: FireFox, DOESN'T WORK: IE

    Code:
    <script language="JavaScript1.2">
    function oC(x)
    {
    	sw = screen.width;
    	sh = screen.height;
    	nsw = sw/1.25;
    	nsh = sh/1.25;
    	window.open('detail.php?type=2&x='+x,'Detailed View','width='+nsw,'height='+nsh,'resizable=0,scrollbars=1,toolbar=0,location=0,directories=0,status=1,menubar=0,copyhistory=0');
    }
    </script>
    I have a table with images and I need to be able to click on an image and have it pop up with details in a new window. It works in FireFox and it doesn't in Internet Explorer. Since most visiters to this site use Internet Explorer, this bug is completely inexcusable. I need to fix it ASAP, as the time constraint is soon approaching. If it stops working in FireFox to solve the IE problem, I can handle that and it isn't a problem to my boss.
    Please help as soon as you can, since I'm more of a database backend/server side scripting guy, not a client side scripting/design/etc. guy...

    Thanks,
    Tom Joyce

  • #2
    New to the CF scene
    Join Date
    Dec 2004
    Location
    Pennsylvania
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Solution Found

    Solution Found:
    http://forums.devshed.com/showpost.p...04&postcount=2

    Thanks for reading!

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Code:
    <script type="text/javascript">
    function oC(x)
    {
    	nsw = (screen.width)/1.25;
    	nsh = (screen.height)/1.25;
    	myLeft = (screen.width-nsw)/2;
    	myTop = (screen.height-nsh)/2;
    	window.open('detail.php?type=2&x='+x+'','DetailedView','width='+nsw+',height='+nsh+',left='+myLeft+',top='+myTop+',resizable=0,scrollbars=1,toolbar=0,location=0,directories=0,status=1,menubar=0,copyhistory=0');
    }
    </script>
    this should be cross browser functional it worked in IE,FF, and Netscape, and it centers the newly opened window centered on the screen, but if u found a solution feel free to use that one also
    Last edited by _Aerospace_Eng_; 02-01-2005 at 12:55 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
    •