473,511 Members | 16,258 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Click link in embeded Object trigger parent window reload?

Hi. I've had to turn an IFrame-embedded page into a an Object using the
data attribute to hold the page to meet XHTML STRICT validation. The
<object>'s embedded page is a query URL returning a basic HTML page to
hold an <alink enclosing a thumbnail of a latest added record in a
picture database. So far, so good.

What I need is that clicking the embedded image/link causes the parent
page to load a new URL. What syntax do I use to refer to the 'parent'
page rather than the page actually containing the <alink.

Actually I could probably us the thumbnail <img>'s onclick event rather
than an enclosing <alink but the same syntax problem arises. Sorry, no
URL to show as the page in on an intranet (which is also the eventual
deployment scenario - with a mind to security issues, etc.)

TIA

Mark

Jun 28 '07 #1
4 4362
d d
Mark Anderson wrote:
Hi. I've had to turn an IFrame-embedded page into a an Object using the
data attribute to hold the page to meet XHTML STRICT validation. The
<object>'s embedded page is a query URL returning a basic HTML page to
hold an <alink enclosing a thumbnail of a latest added record in a
picture database. So far, so good.

What I need is that clicking the embedded image/link causes the parent
page to load a new URL. What syntax do I use to refer to the 'parent'
page rather than the page actually containing the <alink.

Actually I could probably us the thumbnail <img>'s onclick event rather
than an enclosing <alink but the same syntax problem arises. Sorry, no
URL to show as the page in on an intranet (which is also the eventual
deployment scenario - with a mind to security issues, etc.)
TIA
Mark
Is this what you're looking for ?

onclick="parent.location.href='http://example.com';"

~dd
Jun 28 '07 #2
"d d" <no*****@please.netwrote in message
news:f6*************@news.t-online.com...
Is this what you're looking for ?

onclick="parent.location.href='http://example.com';"

~dd
Thanks. Having started out from a context of frames/iframes I'd headed
down quite the wrong path.

However, it's not quite the solution - it works in Safari & Firefox but
IE (v6) loads the called page into the clicked <object>. Is this an IE
bug or is some conditional syntax needed for different UAs?

Mark
Jun 29 '07 #3
d d
Mark Anderson wrote:
"d d" <no*****@please.netwrote in message
>Is this what you're looking for ?
onclick="parent.location.href='http://example.com';"
Thanks. Having started out from a context of
frames/iframes I'd headed down quite the wrong path.
However, it's not quite the solution - it works in Safari & Firefox but
IE (v6) loads the called page into the clicked <object>. Is this an IE
bug or is some conditional syntax needed for different UAs?
Mark
Hard to comment without seeing the code, but maybe
try using top.location.href instead.

~dd
Jun 29 '07 #4
"d d" <no*****@please.netwrote in message
news:f6*************@news.t-online.com...
Mark Anderson wrote:
>"d d" <no*****@please.netwrote in message
>>Is this what you're looking for ?
onclick="parent.location.href='http://example.com';"
Thanks. Having started out from a context of frames/iframes I'd
headed down quite the wrong path.
However, it's not quite the solution - it works in Safari & Firefox
but IE (v6) loads the called page into the clicked <object>. Is this
an IE bug or is some conditional syntax needed for different UAs?
Mark

Hard to comment without seeing the code, but maybe
try using top.location.href instead.

~dd
Understood, here's a test page I've made it as simple as possible so as
to try and avoid side issues. I've added the onclick to the image in
the 'embedded' page. Code is validating XHTML 1.0 Strict.

Both top.location and parent.location work in Safari(v2), Firefox(v2
Mac/Win). IE6 persists in loading the resulting page back into the
calling object not the parent frame (...and you guessed, the main target
browser is IE <sigh>).

Regards

Mark
Jun 29 '07 #5

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

Similar topics

1
11063
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
5071
by: Snolly | last post by:
Hi all, Here is my issue. I have a web page (lets call it page1) with an iframe in it that then opens a pop-up window (page2). The pop-up window is used to edit some data that was loaded into...
2
2596
by: yatharth | last post by:
I am facing a problem ,the situation is like this. I have a home page named "Index.html" ,on which there is login link,when i click on the login link the login popup opens and user enter the...
4
4819
by: Miguel Dias Moura | last post by:
Hello, I created a datalist in an ASP.Net / VB page. I display the image and price of a few products. When a user clicks an image I want to load the page "detail.aspx?number=id" and send the...
4
4058
by: Ian Davies | last post by:
Hello I am struggling for a solution to clear some fields on my webpage that takes their values from some sessions My solution below works when the button is clicked twice. I sort of know why I...
7
24514
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
3057
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
2256
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...
4
2793
by: Peter | last post by:
ASP.NET 3.5 I have a web page and this web page has a DataList, when user hovers the mouse over a picture in the datalist a popup appers, this popup is a User Control and it has a cancel button....
0
7242
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
7353
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,...
0
7508
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...
1
5063
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...
0
4737
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...
0
3212
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1572
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 ...
1
781
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
446
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...

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.