0

How can I get the linked file name of other webpage which is not in same domain using iframe in my webpage ? code is below

<iframe src='www.abcd.com/index.html'></iframe>

In index.html page it has one link like <a href="qwert.pdf"> and the .pdf file name is changing frequently so want to find out the file name of this link dynamically . I have tried using

$("#frame").contents().find("#nestedIframe").contents() 

method but its denied becoz of domain issues. Is it possible to do with javaScript,html,php,ajax,xml,jquery ?

Jay Blanchard
  • 33,530
  • 16
  • 73
  • 113
MikePappa
  • 48
  • 1
  • 1
  • 11
  • Not possible through client-side code only because of cross-domain policy. You need a server-side proxy on the same domain as your JS. (Last answer in the duplicate is what you need) – Sergiu Paraschiv May 05 '16 at 15:28
  • 1
    Better duplicate: http://stackoverflow.com/questions/9393532/cross-domain-iframe-issue – Quentin May 05 '16 at 15:28
  • Thanks for the response now tell me how to overcome cross-domain policy using proxy – MikePappa May 05 '16 at 15:32

0 Answers0