473,668 Members | 2,536 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with open enlarged version of an image in a new window

Hello NG,
i have a picture galerie with thumbnails. I want to add JS functionality
that opens a new window with an enlarged version of the image when the user
clicks on the thumbnails picture.
See the following URL for an example:
http://www.faschingsclub-roettenbach...gramm2003.html

What happens with my showLargeImage function now is that whenever I want to
open the first image (could be any of the 22 pictures on the page), the new
window always shows the upper left image (['image1']). The function does not
execute the change of image sources. What can I do about this?

Generally, am I doing this right or is there a better way of implementing
this showlargeImage functionality?

Thanks a lot,
Markus
Jul 20 '05 #1
1 1793
Lee
Markus Seibold said:

Hello NG,
i have a picture galerie with thumbnails. I want to add JS functionality
that opens a new window with an enlarged version of the image when the user
clicks on the thumbnails picture.
See the following URL for an example:
http://www.faschingsclub-roettenbach...gramm2003.html

What happens with my showLargeImage function now is that whenever I want to
open the first image (could be any of the 22 pictures on the page), the new
window always shows the upper left image (['image1']). The function does not
execute the change of image sources. What can I do about this?

Generally, am I doing this right or is there a better way of implementing
this showlargeImage functionality?


The window.open() function returns immediately, before the new window
is actually opened. You're trying to change the source of the <img>
tag before that tag has been created.

It's probably simplest to send the URL of the image to the new window
in the search portion of the window's URL:

window.open('la rgeImage.html?m yimage.gif',... )

and use Javascript code in largeImage.html to change the img source.

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1881
by: Steven Choo | last post by:
Hi all, I have used a script which allows visitors of my personal website to click on a small image to see an enlarged version in a pop-up. It would be great if i could add some text within the pop-up, say below the enlarged image, to give visitors a brief description. Can anyone help with how I would do this? I'm fairly new to all this so a detailed explanation would be great!
7
4785
by: Merlin | last post by:
Hi there, I have a serious problem with opening a new window with the help of JavaScript. The problem only occures with Firefox. Once you click on the item which fires up the open function, the new window opens up, but in the background the original window loads the homepage. I cant find a way to fix this so the site remains in the old window. Please have a look, if you click on the picture with the car you will see the problem.
4
2422
by: VR | last post by:
First, greetings to everyone :) I'm doing a university seminar & I've encountered a problem. I have a gallery with thumbnails linked on pictures. What I want is popup to be opened with dimensions of linked picture after clicking on a thumbnail. I found javascript which is compatible with IE, Firefox & Opera but I can't get it to work. All I get is this http://www.justfonts.com/tini/problem.html (thumbnail dissapeared).
23
6397
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div align="center">
3
2161
by: EnjoyNews | last post by:
I have a popup problem. I have a script that generates a popup for image viewing. It has 2 function, and the first is that it automaticly generates the popup window to the size of the image, and the second is that it closes the popup window when you click outside of it. It is a script I have found on the internet, since I have no experience in javascript coding.
4
1501
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I open a new window with javascript? ----------------------------------------------------------------------- New windows can be opened on browsers that support the « window.open » function and are not subject to the action of any pop-up blocking mechanism with code such as:- if(window.open){ wRef =...
9
2583
by: tshad | last post by:
This was posted before but the message got messed up (all NLs were stripped out for some reason). I have 2 labels that hold the name of different images on my .aspx page. <asp:Label ID="Logo" runat="server"/> <asp:Label ID="CompanyPicture" runat="server"/> I have 2 links that open the windows to preview these images. The previewed images are done on separate html pages that do nothing but display the
5
3686
by: althafexcel | last post by:
hi everyone Im trying to include an external js in my aspx page under the head tag, it doesn't load or it displays an object expected error whenver the function from the .js is called. Actually for repeated html im using the external js, i mean the TOP, BOTTOM they are repeated in every page, so i include them as functions in the external js and call them. Why it doesn't work?
13
1543
by: BMc | last post by:
I just want to take a moment to say thank you to so many of you who posted a response to my request for help about the problem with THE GAP (see below?)! Your suggestions were not only a solution to the problem, but they were given in a way that encouraged further learning about the subject and gave me more information that helped me move forward today. I have actually gotten the page to work with the same style sheet for ff, opera,...
0
8462
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8381
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8799
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8586
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6209
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5681
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4205
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2792
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.