473,856 Members | 1,755 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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="javasc ript:window.ope n('Images/image_name.jpg' ,'window','widt h=430,height=56 0,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 #1
1 1627
try this:

<a href="#"
onClick="javasc ript:window.ope n('Images/image_name.jpg' ,'window','widt h=430,
height=560,resi zable=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.c om> 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="javasc ript:window.ope n('Images/image_name.jpg' ,'window','widt h=430,
height=560,resi zable=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
11120
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> function CloseWindow() { if (window.opener && !window.opener.closed) { window.opener.document.location.reload(); window.close();
2
23517
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 window to open a child window thru javascript window.open 2) I have some functionality in the child window that changes the data
6
9862
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 'window.opener.location.reload(true);self.close();' but i need the parent window not to reload or else data that the user has already entered will be lost during the IsPostBack. I need the 'Apply' button on the popup to trigger the 'Update' button on the parent screen. The script ive seen...
4
2768
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 displayed by the parent page. In order to refresh the parent page, I would like to raise an event in the popup (child) page that is subscribed to by the parent so that I can rebind the data in the parent page once the data in the child window data is...
7
24555
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 an i-frame in it. The i-frame contains various dynamic links for opening data entry popups. One of these popups has a couple of i-frames itself. These i-frames also have links to scripts which make changes to a server side database. I need for...
3
3080
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 something similar to this? Thanks, Joe
2
2280
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 window.open("","EVENT_DETAILS_WINDOW","height=310,width=480,top=150,left=200,status=yes,resizable=yes,scrollbars=yes"); form.target="EVENT_DETAILS_WINDOW"; form.action= "event.jsp" form.submit(); From B I am opening a another window C and closing window B the code..
0
1618
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 following to add an attribute to the body tag, body.Attributes.Add("onunload", "opener.location.href=opener.location.href;");. This causes the parent page to reload anytime the child page has a post back event or closes. Also I am getting an...
2
3829
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 with PgB, they click a button that executes this VB: Protected Sub Close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Close.Click 'Do some stuff Response.Write("<script language='javascript'{...
0
9906
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
9758
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
10694
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...
0
10379
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9528
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
7088
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
5956
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4171
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3196
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.