Jump to content

iframe help


Kolinski

Recommended Posts

I need some help amending a comment tag in a text-area. Of-course this would be easy if I could just simply edit the html. However the script is using an i-frame. I can't find where the i-frame code is. 

 

What can I do when looking in the directory for the iframe, where is it? 

 

If you need me to show you the file structure that can be done and I can show you the code of where the iframe is. 

 

 

 

 

Link to comment
Share on other sites

You should be able to modify iframe content with window.frames[index], where index is an integer for each <iframe> element, starting at 0.

 

Example.

 

<html>
<head>
<title>IFrames</title>
<script type="text/javascript">
window.onload = function(){
var ifr = window.frames[0];
for(var i = 0, d; (d = ifr.getElementsByTagName("body")[0].getElementsByTagName("*")[i++]); ){
alert(d.innerHTML);
}
};
</script>
</head>
<body>
<iframe src="/somepath/somefile.php">
Your browser does not support iframes.
</iframe>
</body>
</html>
That would alert the innerHTML of the entire iframe, one by one. Of course, that is not a productive code, but it demonstrates my point.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.