Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sending information from a frame to another one

Status
Not open for further replies.

Davide77

Technical User
Mar 6, 2003
166
CH
Hallo,
I'm trying to achieve this:
one page with a textarea and a frame. In the text area it will be possible to write dome html code and then after clicking a button the code will be displayed in the frame but not as code since as a normal page. You can see an example of this at:
www.w3schools.com
They use asp, but I would like to do it in javascript. Does someone have a starting point idea?
 
Here is banzai (e.g. written during coffee break) solution without frames:

<form name="foo">
<textarea name="htmlcode" rows="10" cols="80"></textarea>
<input type="button" value="Render" onclick="javascript: document.getElementById('preview').innerHTML = document.forms['foo']['htmlcode'].value;">
</form>
<div id="preview"></div>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top