By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,299 Members | 1,054 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,299 IT Pros & Developers. It's quick & easy.

Click link in embeded Object trigger parent window reload?

P: n/a
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
Share this Question
Share on Google+
4 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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 discussion thread is closed

Replies have been disabled for this discussion.