Jump to content

Question


Chocolate570

Recommended Posts

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

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

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 :)

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...