EllisLab text mark
Advanced Search
     
Call javascript (jquery) from iframe on parent?
Posted: 01 May 2012 09:59 AM
Joined: 2011-06-24
101 posts

Struggling with fileupload, I’m trying to inject some javascript code into the iframe used for uploading a file.

I can send:

echo '[removed]alert("SUCCESS FROM IFRAME");[removed]'

to the iframe and have it work, but I can’t send:

echo "[removed]$('#admin_content').html('HOORAY!!!');[removed]"

Now, is that security or something preventing this?

 
Posted: 01 May 2012 02:23 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2009-02-19
4325 posts

Sounds like a jQuery forum would be better for all of these questions you have lately, which don’t have anything to do with CI.

 Signature 
 
Posted: 01 May 2012 02:40 PM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2009-05-17
1432 posts

I like the Sitepoint forum for js / jquery.

 Signature 

Brian
Brian’s Web Design - Temecula
Community Auth - CodeIgniter Authentication Application

 
Posted: 01 May 2012 02:50 PM   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2011-01-24
149 posts

Its a security measure to not allow an iFrames-content to be manipulated in either direction.

 Signature 

Foreign source code is like a minefield…