mrindie Posted November 23, 2009 Report Share Posted November 23, 2009 Hello, (First post here.) I'm building a site with a bunch of product shots. When I'm scrolled down a longer page and click a thumbnail image to view a larger image in a new window, the new window opens fine, but the main page underneath pops back up to the top of the page. I want it to stay where it is. How do I do this? Here's a link to a test page: http://clydemachines.com/clyde_css_tester1/towbars.html Thanks. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted November 23, 2009 Report Share Posted November 23, 2009 I'm on phone so I can't see code. But if I disable js your popup fails. So you probably just have a # in the anchors href. You need to put something like ;javascript in the href="". that syntax is probably not spot on so google it. Quote Link to comment Share on other sites More sharing options...
mrindie Posted November 24, 2009 Author Report Share Posted November 24, 2009 Eric, I'm afraid I don't understand. I do have a "#" but I don't know what else to put in there. I'm trying to get the new window (with the larger image) to open up with specific dimensions--so the window is form-fitting around each image. The only way I know how to do that is the way I'm currently doing it. The only problem is that the main page pops back up when I click that link. Conversely, I also have a link to a PDF for each of these products. They're opening into new windows just fine. But if I try to use that method for the thumbnail images I can't figure out how to control the new window size. Below is a typical line of code for one of these products: Larger Image | Full Specs (pdf) Can you be more specific about what I need to do? I'm new to this. Thanks. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted November 24, 2009 Report Share Posted November 24, 2009 (edited) OK, so if I were to google it I'd google... , or javascript href to prevent page shift, or you think of one. Edited November 24, 2009 by Eric Quote Link to comment Share on other sites More sharing options...
virtual Posted November 24, 2009 Report Share Posted November 24, 2009 I think Eric means something like this http://stackoverflow.com/questions/1631924/preventing-onclick-page-jumps Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted November 24, 2009 Report Share Posted November 24, 2009 Fine, here, it's in there... http://www.visibilityinherit.com/code/the-photo-gallery/gallery.php Quote Link to comment Share on other sites More sharing options...
mrindie Posted November 25, 2009 Author Report Share Posted November 25, 2009 What I found that's working is: "javascript:(void);" Thank you all. Quote Link to comment Share on other sites More sharing options...
PicnicTutorials Posted November 25, 2009 Report Share Posted November 25, 2009 (edited) For the record mine works also. Edited November 25, 2009 by Eric Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.