4

i have IFrame in my page and a link inside it, i want to open that link immediately after opening my page. for example i have a page index.html and inside this page i have an IFrame and inside this IFrame i have a link for example

<a href="http://google.com">google</a>

now i want to open this link when i load Index.html i want to know how can i do this with JQuery or JavaScript ?

Kamran Sadin
  • 921
  • 1
  • 11
  • 18
  • Is that a cross domain iframe? Can you edit this iframe source code? – A. Wolff Apr 18 '15 at 11:05
  • No, i can not edit this i frame, just i have a script code that this code shows this i frame in my site, only i can see this iframe code from View Source menu of my browser – Kamran Sadin Apr 18 '15 at 11:10
  • If it is a cross domain iframe then you are out of luck. You could still proxify it server side, but... – A. Wolff Apr 18 '15 at 11:17
  • http://stackoverflow.com/questions/24688268/can-a-button-click-cause-an-event-in-iframe/ – guest271314 Apr 18 '15 at 11:27
  • let me say that iframe has no ID or name, and every time i refresh my page the link address (href) inside the iframe changes – Kamran Sadin Apr 18 '15 at 13:03
  • You mean i can not do that?it is a cross domain iframe, there is no way to get access to iframe elements? – Kamran Sadin Apr 18 '15 at 13:29

0 Answers0