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? Quote Link to comment 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. Quote Link to comment 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=""/> ??? Quote Link to comment 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> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.