Reputation: 30187
My iframe is having a url with a hash value when i do iframe.src it just gives me the url without the hash appended to it from the other domain. Can i read the entire url with the hash.
Upvotes: 4
Views: 8566
Reputation: 178079
Not likely due to security constraints - I am surprised you can even get the URL
Can you show the code?
Sounds like a duplicate of How to get iframe contentWindow height in cross domain
Upvotes: 2
Reputation: 5316
var contentWnd = $('iframe').attr('contentWindow');
var hash = contentWnd.window.location.hash;
Adaptation of this answer: Get url from iframe and update hash in browser url
Upvotes: 2