Chocolate570 Posted October 14, 2005 Share Posted October 14, 2005 http://w3schools.invisionzone.com/index.php?showtopic=205^^ Original topic.I was wondering; using the same concept as x= window.open("blahblahblah")x.document.write("blahblabvjoisajdfa")can't you do that with an iframe??? like, document.getElementsByIdTag('iframe1').src="variable"? To recreate the tryit editor with js? If anyone understands what i mean, please post. Link to comment Share on other sites More sharing options...
Chocolate570 Posted October 15, 2005 Author Share Posted October 15, 2005 Ok, let me clarify as i explained it horribly.What i wanted to do, i put 2 frames on the page. One frame would have a text area in it, where you can code, and then there would be a button at the top.When you click the button, it will change the rught iframe to a window, and then write what you put at the left side in the document at the write using the method i kinda explained at the top..Anyone? Link to comment Share on other sites More sharing options...
Paim Posted October 15, 2005 Share Posted October 15, 2005 Yes...im pretty sure you could...but I don't know if it would only need JS or also PHP....but yes it would be possible, judging by the source code on the tryit pages Link to comment Share on other sites More sharing options...
Webworldx Posted October 15, 2005 Share Posted October 15, 2005 All depends on how much access you have to the second frame, i guess. If it's on the same server, you should be able to pass stuff from window to window... Link to comment Share on other sites More sharing options...
Jonas Posted October 15, 2005 Share Posted October 15, 2005 Yes...im pretty sure you could...but I don't know if it would only need JS or also PHP....but yes it would be possible, judging by the source code on the tryit pages <{POST_SNAPBACK}> I know it's possible with Javascript, because I did it once on my old site, which I lost. It was my first site, and made with frames, and I didn't back it up, because it wasn't any good. But the script was excellent... :(I got an A at the time, because it was a project in Computers course. Perhaps my teacher from last year still has the page, because I think I gave her a cd. I'll ask her on monday... Link to comment Share on other sites More sharing options...
Jonas Posted October 21, 2005 Share Posted October 21, 2005 http://www.home.no/jvelde/html-preview.htmlThere, that works in IE and Opera, but for some reason not FF. However, it should give you the idea of how to output to an iframe. Go nuts with it, and see if you can get it to work cross-browser. And get back to us with the result if you do... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now