0

How to display the output in a seperate box?

https://code.sololearn.com/WanE6MDr1guk/?ref=app

14th Jul 2018, 4:06 PM
B.D
B.D - avatar
11 Answers
+ 1
Bithi D You could create a separate box using the <div id="output"></div> Then you can display the results inside the div
14th Jul 2018, 4:15 PM
Dlite
Dlite - avatar
+ 1
how an html code in a div?
14th Jul 2018, 5:17 PM
B.D
B.D - avatar
+ 1
Maybe try: https://www.sololearn.com/discuss/1389112/?ref=app And see which method you prefer.
14th Jul 2018, 10:38 PM
Janning⭐
Janning⭐ - avatar
+ 1
Hi Bithi D, Based on the title of the code you posted and what it looked like you were trying to implement, it seems like you are trying to make a code editor. So why wouldn't looking at an example of a simple code editor help you?
15th Jul 2018, 7:53 AM
Janning⭐
Janning⭐ - avatar
+ 1
Hi Bithi D, If we're talking about the squarefree editor, there's no button in Jesse's implementation. The results are displayed live in the bottom frame while you type in the top. You could probably expand on it by adding a button that allows the user to save the code (or copy/cut as desired).
15th Jul 2018, 8:05 AM
Janning⭐
Janning⭐ - avatar
+ 1
Try: https://stackoverflow.com/questions/3665115/create-a-file-in-memory-for-user-to-download-not-through-server The top answer has a jsFiddle in it. Test to see if it will serve your purposes.
15th Jul 2018, 8:43 AM
Janning⭐
Janning⭐ - avatar
0
How will this editor help me?
15th Jul 2018, 6:25 AM
B.D
B.D - avatar
0
I presume that the editor displays the output in a separate frameset So if I press the run button, the code should create a new html file and display the frameset isn't it?
15th Jul 2018, 7:55 AM
B.D
B.D - avatar
0
I think a run button is more useful.
15th Jul 2018, 8:28 AM
B.D
B.D - avatar
0
To create a new html file to put the value of the code in it? which statement can I use?
15th Jul 2018, 8:29 AM
B.D
B.D - avatar
0
<a href="data:application/octet-stream;charset=utf-16le;base64,//5mAG8AbwAgAGIAYQByAAoA">text file</a> 5mAG8..... Is it the URL?
15th Jul 2018, 8:52 AM
B.D
B.D - avatar