471,831 Members | 770 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How do i open a hyperlink in parent page using javascript?

Please tell me,
How do i open a hyperlink in parent page using javascript?
May 7 '07 #1
1 2607
16,027 Expert Mod 8TB
What do you mean by opening a hyperlink? Do you mean visiting the link? In the same window or opening another one?

To access the parent page, try:
Expand|Select|Wrap|Line Numbers
  1. window.opener
The links collection will give you the links in a document. If you have given the link an id, it is even easier:
Expand|Select|Wrap|Line Numbers
  1. window.opener.document.getElementById(linkid)
To change the location:
Expand|Select|Wrap|Line Numbers
  1. location.href=newurl
If you still have problems, post your code.
May 7 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

40 posts views Thread by Brian Jorgenson | last post: by
5 posts views Thread by Kojak | last post: by
4 posts views Thread by KenG | last post: by
9 posts views Thread by smokeyd | last post: by
1 post views Thread by tomek.romanowski | last post: by
reply views Thread by NeoPa | last post: by
reply views Thread by aboka | last post: by

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.