469,347 Members | 2,100 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,347 developers. It's quick & easy.

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 2571
acoder
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
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.