TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
surya sasidhar
NA
15
42.7k
How to get Url of the page which is in iframe?
Aug 28 2010 8:37 AM
hi,
In my web application i am using iframe for displaying the sites.
now i want to get the url of the site which in iframe, i write the code for getting the url of the site which in iframe this is my code. i write javascript for fetching the url like..
function getSrc()
{
var v= document.getElementById('myIframe').src;
alert(v);
}
<a href="#" onclick="javascript:getSrc()">Get src</a>
it is working fine, but problem is for example in my iframe i am displaying one site like amazon.com , when i click on books in amazon it will redirect to another books page now i want to get the url of the current page (i.e., Books page in amazon).
my code always fetch the url of http://www.amazon.com. but i want to get the url of the current page when i click on books. how can i please help me. Thank you
Reply
Answers (
0
)
select all checkboxes using javascript?
picture in database