473,549 Members | 2,862 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 1788
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
1873
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...
7
4780
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...
4
2417
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...
23
6380
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
2153
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...
4
1488
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...
9
2570
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...
5
3680
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...
13
1532
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...
0
7446
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...
0
7715
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. ...
0
7956
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...
1
7469
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...
0
7808
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3498
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...
1
1935
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
0
757
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.