P
P
polyakov_andrey2010-11-19 01:40:12
JavaScript
polyakov_andrey, 2010-11-19 01:40:12

Loading your Javascript into iFrame content?

Hello, please tell me, is there an iFrame on the page, it is necessary to make sure that my javascript code is included in this iFrame (in the body),

for example
<\iframe src="http://apple.com">

, where on the apple.com website open in the iframe it is necessary to add to the Body tag, for example:

&lt;script src=&quot;http://code.jquery.com/jquery-1.4.4.js&quot;&gt;&lt;/script&gt;<br/>


I tried to use the Jquery.contents() method , it did not work, tell me how to solve the problem?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
B
be3_max, 2010-11-19
@be3_max

You can only change the content of an apple.com iframe if the iframe is on an apple.com page. Cross domain access is disabled for security reasons. You can forcefully disable the restriction in the browser settings.

J
JeanLouis, 2010-11-19
@JeanLouis

As mentioned above, no way.
But you can get the content of the apple page from the server and print it on your site or display it through your iframe. And put whatever you want in there.

P
Pavel Nekrasov, 2010-11-19
@freeart

Why frame? you can also add your script to the body, which will have full access to the apple page.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question