   [web] PHP
  I get some weird behaviour with my php dynamic gallery.It reads a folder, and presents the pictures inside it. But when I click on a picture and the popup window appears, the page returns to its topmost scrollable point. How do I keep the page to where it is?   
  Just a guess, but it sounds like you are using "#" as the href attribute for the a tag and then using &#106avascript to popup the larger image. Try putting "return false;" at the end of your onclick function. That way it wont actually try to find the anchor.   ;  Sorry for the late response, yes I am using # as my href variable but my onclick function is the default one, I dunno where that boolean return is locatedthat's how I do it:"<a href='#' onclick=window.open('popup.php?......>;  Try:<a href="#" onclick="window.open('popup.php?...'); return false;">;  Enter an empty location.   ;print "<a href=' ' onclick=window.open('popup.php?...');return false;>still the same :S   ;Quote:Original post by Tipotas688 *** Source Snippet Removed ***still the same :SI'm pretty sure you need the double quotes (See my above post), otherwise how is the browser to know that the "return false;" is associated with the onClick handler?   ;  its part of php so its like this as a whole:print "<a href='#' onclick=window.open('popup.php?....');></a>";  and if I have it like this:print "<a href='#' onclick='window.open('popup.php?....');return false'>then the popup window doesnt appear at all and the current page is scrolled back upEDIT:PS: The popup function has an onblur=self.close()   ;  You haven't escaped your single quotesonclick='window.open('popup.php?....');return false' ^    ^Tryprint "<a href=\"#\" onclick=\"window.open('popup.php?....');return false\">";