473,395 Members | 1,666 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

clicking on a thumbnail in a parent window causes parent to reload

Hi, I have several webpages that have around 50+ thumbnail images in it in a
table structure spanning (3 columns) x (17+ rows).

Each thumbnail is wrapped in the following piece of javascript:

<a href="#"
onClick="javascript:window.open('Images/image_name.jpg','window','width=430,height=560,res izable=yes')">

Now since there are so many thumbnails, the page needs to be scrolled to
view the thumbnails at the bottom of the list. When i click on one of these
bottom images, a popup window opens and the enlarged image is displayed
within. Thats ok. But the behaviour im getting is that the parent window
(containing all the thumbnails) is reloaded and defaults to the top of the
page. So I basically have to re-scroll down again to view the next image at
the bottom of the list. This is most annoying.

How can i set this us such that when i press a thumbnail located in the
parent window, the parent window will remain static and not be reloaded and
default to the top of the page.

I do realise that href="#" will reference back to the original page
containing the thumbnails, hence reloading/defaulting to the top again. Is
there any way around this?

Any help most appreciated!

Cheers,
Peter
Jul 23 '05 #1
1 1596
try this:

<a href="#"
onClick="javascript:window.open('Images/image_name.jpg','window','width=430,
height=560,resizable=yes'); return false;">

the return false for the onclick event cancels the normal action for
clicking on a link, which is to follow that link. And I'm not completely
sure about this, and it's not a big deal, but I don't think you need the
"javascript:" before the function call.
"PWalker" <p.******@rad.com> wrote in message
news:42********@dnews.tpgi.com.au... Hi, I have several webpages that have around 50+ thumbnail images in it in a table structure spanning (3 columns) x (17+ rows).

Each thumbnail is wrapped in the following piece of javascript:

<a href="#"
onClick="javascript:window.open('Images/image_name.jpg','window','width=430,
height=560,resizable=yes')">
Now since there are so many thumbnails, the page needs to be scrolled to
view the thumbnails at the bottom of the list. When i click on one of these bottom images, a popup window opens and the enlarged image is displayed
within. Thats ok. But the behaviour im getting is that the parent window
(containing all the thumbnails) is reloaded and defaults to the top of the
page. So I basically have to re-scroll down again to view the next image at the bottom of the list. This is most annoying.

How can i set this us such that when i press a thumbnail located in the
parent window, the parent window will remain static and not be reloaded and default to the top of the page.

I do realise that href="#" will reference back to the original page
containing the thumbnails, hence reloading/defaulting to the top again. Is
there any way around this?

Any help most appreciated!

Cheers,
Peter

Jul 23 '05 #2

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

Similar topics

1
by: Debbie Davis | last post by:
Hi there, I'm not very good at javascript but I'm using the following to close a child window and refresh a parent window after updating a database. It's within an ASP page. CODE <SCRIPT>...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
6
by: mkobus | last post by:
Im relatively new, so please be patient with me... I need to update a parent .aspx screen from a popup and close the popup. Normally I would use...
4
by: Earl Teigrob | last post by:
I am thinking about using a popup window to edit settings that will affect parent asp.net page. The data that is changed in the popup window will be saved to the datastore that is loaded and...
7
by: Raffi | last post by:
I'm facing a tricky (at least for me) page reload/refresh scenario and need some help. I'm working on a web application which is primarily used with MSIE. The application has a main window with...
3
by: Joe | last post by:
I need to popup a window, allow the user to select an image, update the parent window with this new value (requires a refresh) and then close the child window. Are there any examples of...
2
by: svbc | last post by:
Hi, I am facing a problem with refreshing parent: Parent window : A From A I am opening a child window B using...
0
by: =?Utf-8?B?UGF1bA==?= | last post by:
Hi just wondering if anyone knows if there is a way to tell if a child window is still open in the code behind in the parent window (web application vs.net 2005)? I have a web app and am using the...
2
by: =?Utf-8?B?U2lsa0NpdHlGbG9yaWRh?= | last post by:
I have a web page "PgA" with a GridView. I open another page "PgB" in a new window. On PgB, they do some things that affect the underlying data for the GridView on PgA. When the user is done...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.