JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old April 8th, 2007, 01:55 PM
method method is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Posts: 54 method User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 45 m 12 sec
Reputation Power: 4
Unhappy Problems getting same-domain IFRAME content

I have an invisible IFRAME, and a visible DIV:
Code:
<div id="text" style="z-index:90;" class="chatWindowTextDisplay"
title="Chat Transcript - "
alt="Chat Transcript -"
><iframe name="textFrame" id="textFrame" src="http://localhost/iframeContent.php?cmd=file&file=chatTemplate&template=chatText&site=676789&sessionkey=H9030219168890559071K46359640" frameborder="0" border="0" width="350" height="220" class="chatWindowTextFrame"
title="Chat Transcript - "
alt="Chat Transcript - "
>This functionality requires frames. </a>.</iframe>
</div>

invisable iframe:
Code:
document.writeln('<div id="hiddentext" style="z-index:0;position:absolute;visibility:hidden;left:0;top:13px">'+
    '<iframe name="lpCommFrame" id="lpCommFrame" src="http://localhost/iframecontent.php" frameborder="0" border="0" width="350" height="220" title="Background">'+
    'This functionality requires frames. </iframe>'+
'</div>');

I need to copy the content from the lpCommFrame IFRAME, into the textFrame iframe which is inside DIV. Everything
comes from the same domain, so there are definitely not any cross-domain security issues.

I was able to get the content of hidden iframe and display it in alert using this code:

var win = window.frames['lpCommFrame'];
var newtext = win.document.body.innerHTML;
alert("textframe"+newtext);

But how to place that data in to my other frame which is called textFrame? i be happy if some one show me how to copy content of lpCommFrame frame to textFrame frame .Thanks

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Problems getting same-domain IFRAME content


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway