Hello sir,
I want to make a HTML page with the window splitted into two.
In the left side i will give the html coding and the right side i want output for that coding(during runtime).

Recommended Answers

All 8 Replies

Do you want this to just show the HTML for a website you made, or have it be an interactive thing were someone puts in HTML code on the left and the output shows up on the right?

I resolved this one. Here is the coding for that one.

<html>
	<head>
		<TITLE>My First Frame Page</TITLE>
		<script type="text/javascript">
			function PreviewHTML()
				{
				document.getElementById('preview').innerHTML = document.getElementById('source').value;
				}
		</script>
	</head>
	<body>
		<div style="float: left">
			<textarea id='htmlsource' name='source' rows='30' cols='50'></textarea>
			<br>
			<input type='button' value='Preview' onclick="javascript:PreviewHTML();">
		</div>
		<div id='preview' style="float: left"></div>
	</body>
</html>

Wait...what's this code doing?

Ok, because I tried the code and it didn't do that...

Ok, because I tried the code and it didn't do that...

It doesnot work with other browsers except IE

Reading this thread made my day. :twisted:

It doesnot work with other browsers except IE

Ah, yes, I was using firefox

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.