I am fairly new to iFrames and AJAX. I am looking to create a code area where I enter HTML CSS and JS into three text boxes (or Code Mirrors) and shows up in the results. I have been told to create 3 textareas to put your code (html, javascript, css). When the user presses a button, it sends an ajax request to the server, sending the 3 texts, in order to generate a temporary page that is the composition of the various parts and returning its URL. Then create an iframe that points to it (or update the src of an existing one). How would I do this? Could you give me a rough guide on how todo this (it'd be great to see some code if you have done something similar to guide me)... Thanks
Use a form with target set to iframe:
<iframe id='codeframe' name="codeframe" src="#" width="100%" height="100%" frameBorder="1" scrolling="no"></iframe>
<form id="form1" action="abc.php" method="POST" target="codeframe">
<!-- Three text areas -->
<input type="submit" />
</form>