window.close...

  • Borrow -A- Geek
  • Professor
  • Professor
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 775
  • Loc: Dallas/Ft Worth, Texas
  • Status: Offline

Post April 28th, 2003, 2:10 am

Cool thanks for the tip Dreamer, thats why this forum works, cuz we have so many people with a combined "brain".

i just donated 5 Participation points to you for that one! :-)
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post April 28th, 2003, 2:10 am

  • dreamer7
  • Student
  • Student
  • No Avatar
  • Joined: Jan 20, 2003
  • Posts: 96
  • Loc: UK
  • Status: Offline

Post April 28th, 2003, 3:03 am

lol thanx gadget i knew i was gonna come in useful one day for something other than asking questions lol :D
  • UNFLUX
  • Genius
  • Genius
  • User avatar
  • Joined: Dec 20, 2002
  • Posts: 6382
  • Loc: twitter.com/unflux
  • Status: Offline

Post April 28th, 2003, 8:06 am

great idea gadget! [i gotta remember these things ;)]

dreamer, I just gave you 5 also! :D
UNFLUX.FOTO
  • killercelery
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 10, 2003
  • Posts: 13
  • Loc: Montréal, Québec
  • Status: Offline

Post July 10th, 2003, 7:31 am

I'm not sure if the only problem is the version of IE (5.0) but your code won't work and it works great on IE6, can you please check your version and tell me??
  • dreamer7
  • Student
  • Student
  • No Avatar
  • Joined: Jan 20, 2003
  • Posts: 96
  • Loc: UK
  • Status: Offline

Post July 11th, 2003, 9:49 am

Its true i've had a few people ask me why it doesn't work for them and i couldn't figure it out but i have IE 6 and it works for me but why wouldn't it work for IE 5??
d7
  • killercelery
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Jul 10, 2003
  • Posts: 13
  • Loc: Montréal, Québec
  • Status: Offline

Post July 14th, 2003, 5:55 am

It seems to be IE5 fault. Not sure why, I don't have the technical information but it looks to be a security management problem.
  • trance
  • Newbie
  • Newbie
  • No Avatar
  • Joined: Sep 16, 2004
  • Posts: 6
  • Status: Offline

Post October 1st, 2004, 12:11 am

:lol: thanks for this one!
it really helped a lot!

more power to you guys!
  • mOrfer-
  • Born
  • Born
  • No Avatar
  • Joined: Mar 29, 2006
  • Posts: 1
  • Status: Offline

Post March 29th, 2006, 9:00 pm

Great! ... if i add this code at the beginning of some php page I get fullscreenpage without parent!


PHP Code: [ Select ]
<?php if(!isset($_GET["newwin"])) { ?>
<script language="javascript">
var height = 50;
var width = 50;
var name = "winname";
var top = 0;
var left = 0;
 
newwin=window.open(document.location + "?newwin=true", name, "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
document.write('<a href="#" id="closeWin" onclick="window.opener=null; window.close(); return false">close</a>');
document.getElementById("closeWin").click();
 
</script>
<?php
exit;
} else { ?>
<script language="javascript">
   self.moveTo(0,0);
   self.resizeTo(screen.availWidth,screen.availHeight);
</script>
<?php
}
?>
  1. <?php if(!isset($_GET["newwin"])) { ?>
  2. <script language="javascript">
  3. var height = 50;
  4. var width = 50;
  5. var name = "winname";
  6. var top = 0;
  7. var left = 0;
  8.  
  9. newwin=window.open(document.location + "?newwin=true", name, "fullscreen=no,toolbar=no,status=no,menubar=no,scrollbars=no,resizable=no,directories=no,location=no,width=" + width + ",height=" + height + ",left=" + left + ",top=" + top);
  10. document.write('<a href="#" id="closeWin" onclick="window.opener=null; window.close(); return false">close</a>');
  11. document.getElementById("closeWin").click();
  12.  
  13. </script>
  14. <?php
  15. exit;
  16. } else { ?>
  17. <script language="javascript">
  18.    self.moveTo(0,0);
  19.    self.resizeTo(screen.availWidth,screen.availHeight);
  20. </script>
  21. <?php
  22. }
  23. ?>
  • getvinay
  • Born
  • Born
  • No Avatar
  • Joined: Sep 21, 2008
  • Posts: 1
  • Status: Offline

Post September 23rd, 2008, 12:39 am

i tried this script to close window without alert box.. it works great in IE but doesnot work in firefox.. so can u help me in that??

Post Information

  • Total Posts in this topic: 24 posts
  • Users browsing this forum: No registered users and 163 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.