SitePoint Sponsor |
|
User Tag List
Results 1 to 5 of 5
-
Jan 2, 2004, 17:56 #1
- Join Date
- Dec 2003
- Location
- Dundee, Scotland.
- Posts
- 37
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Controlling the size of popups ???
Hi Folks.
I've a wee problem getting a popup to be the size of the image I want it to contain. I've already searched the Forum and found one such post from about 100 years agowhich I have tried to use without success. The deal is this:
1 - I have an image I would like to enlarge but would like the person viewing my page to still be able to see the original page which was being viewed. Therefore a popup is the obvious solution.
2 - The link to click on to initiate the popup is a smaller version of the image which is about to be viewed.
Here's The code I tried. This code, incidentally, doesn't creat a popup. Nor does it resize it to the size I want it. It merely opens up another full-sized html page which I already have the image on.
<div class="image">
<a href="http://www.gta-jutecity.pwp.blueyonder.co.uk/jute-city/client-screenshot.html" onClick="window.open('http://www.gta-jutecity.pwp.blueyonder.co.uk/jute-city/client-screenshot.html',null,"height=335,width=770");return false; "target="newWin"> <img src="/images/jute-city/tutorial-screenshots/vc-client-03.jpg" alt="VC Client 0.3" width="300" height="150" /></a>
</div>
Regards.
Stewart-boy.
-
Jan 2, 2004, 18:51 #2
- Join Date
- Dec 2002
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
give this a whirl. There were just a couple minor errors.
<a href="http://www.gta-jutecity.pwp.blueyond...creenshot.html" onClick="window.open('http://www.gta-jutecity.pwp.blueyonder.co.uk/jute-city/client-screenshot.html',null,'height=335,width=770');return false;"> <img src="/images/jute-city/tutorial-screenshots/vc-client-03.jpg" alt="VC Client 0.3" width="300" height="150" /></a>
-
Jan 2, 2004, 19:55 #3
- Join Date
- Dec 2003
- Location
- Dundee, Scotland.
- Posts
- 37
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Nice.
Hi cv765.
Thanks for that. It works perfectly. You don't happen to know how I could make a link on the popup close it down do you?
Stewary-boy.
-
Jan 2, 2004, 23:00 #4
- Join Date
- Dec 2002
- Posts
- 5
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
<a href="#" onClick="window.close();">close window</a>
-
Jan 2, 2004, 23:03 #5
- Join Date
- Dec 2003
- Location
- Dundee, Scotland.
- Posts
- 37
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I just found this...
Hi cv765.
I managed to find this:<a class="link1" href="javascript:top.window.close();">Close Window</a> and tried it out just before I came to the forum to check on my thread and it works. However, should I use the method you're recommending as I'm afraid I don't know squat about JavaScript. What do you think?
In the mean time thanks for helping me out cv765.
Stewarty-boy.<edit> I decided to just go with your version cv765 as the one I found looked like I was putting more code in than i needed.
Thanks again. </end edit>Last edited by Stewarty-Boy; Jan 3, 2004 at 12:36.
Bookmarks