rockinaway Posted November 26, 2007 Share Posted November 26, 2007 I want to include predefined text in an iframe but not by using a file. How can I do this? Link to comment https://forums.phpfreaks.com/topic/78993-predefined-text-in-an-iframe/ Share on other sites More sharing options...
roopurt18 Posted November 26, 2007 Share Posted November 26, 2007 Does: <iframe> <html> <head></head> <body><p>Hello, World!</p></body> </html> </iframe> work? If it does that might give you a boost in the right direction. Link to comment https://forums.phpfreaks.com/topic/78993-predefined-text-in-an-iframe/#findComment-399773 Share on other sites More sharing options...
rockinaway Posted November 29, 2007 Author Share Posted November 29, 2007 Nope.. it is replaced by something strange: <br _moz_editor_bogus_node="TRUE" _moz_dirty=""/> ??? Link to comment https://forums.phpfreaks.com/topic/78993-predefined-text-in-an-iframe/#findComment-402390 Share on other sites More sharing options...
phpQuestioner Posted November 30, 2007 Share Posted November 30, 2007 you can not use html inside frame tag; you use html in a noframe tag. you can create a DIV with content in it and then replace it with an iframe. Like So: <script language="javascript"> function loadFrame() { document.getElementById('predefined').innerHTML='<iframe src="http://www.google.com" width="400" height="300" style="border:solid 1px black"></iframe>'; } </script> <div id="predefined"> <div style="overflow:auto;width:400px;height:300px;border:solid 1px black"> My Predefined Content Here </div> </div> <br><br> <a href="javascript:loadFrame()">click me</a> Link to comment https://forums.phpfreaks.com/topic/78993-predefined-text-in-an-iframe/#findComment-402529 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.