...

View Full Version : How to get this type of tryit editor



cryoffalcon
03-15-2012, 07:37 PM
Hi,
well i saw this editor http://www.w3schools.com/svg/tryit.asp?filename=trysvg_circle at w3schools and i was wondering if there is something like this available for use in one's site. I mean if there is a service that provides you with the editor for your site or if there is a way out to make something like this if there is already a script available.
My knowledge is till html&css so this is what i don't know

ckeyrouz
03-15-2012, 09:05 PM
I created a quick sample of an HTML editor. try it

<html>
<head>
<script type="text/javascript">
function display(obj)
{
var obj = document.getElementById("htmlCode");
var iframe = document.getElementById("result");
var doc = iframe.document;

if(iframe.contentDocument)
{
doc = iframe.contentDocument;
}
else if(iframe.contentWindow)
{
doc = iframe.contentWindow.document;
}
// Put the content in the iframe
doc.open();
doc.writeln(obj.value);
doc.close();

}
</script>
</head>
<body>
<table width="100%" height="100%" border="1 ">
<thead>
<tr height="30px">
<th width="50%">
<button onclick="display()">Write your code and click me DD</button>
</th>
<th>Result</th>
</tr>
</thead>
<tbody>
<tr height="*">
<td width="50%" valign="top">
<textarea cols="115" rows="50" id="htmlCode"></textarea>
</td>
<td width="50%" valign="top">
<iframe id="result" frameborder="1" width="100%" height="100%">
</iframe>
</td>
</tr>
</tbody>
</table>
</body>
</html>

cryoffalcon
03-15-2012, 09:41 PM
FIRST OF ALL thanks alot for really quick reply.
Well i tried almost everything in it like css, css3, html, javascript, jquery, php etc and everything works perfect, just there are two problems.

i-- the result is very small (i hope it is changeable with css)
ii-- sometimes the button doesn't work, like you post the code and then click on it, it doesn't work. but in 20 tests it happened only 2 times with me and i have no clue why did this happen.

At the end i would say, it was really really good to see such small script so much effective, you must be very smart person. Thanks alot ^_^

cryoffalcon
03-15-2012, 09:46 PM
one more thing i didn't read what you wrote as your signature now i read it and i am laughing now, i am not a software developer but when i am coding before the result appears i am always praying :D "WELL SAID"

ckeyrouz
03-15-2012, 10:12 PM
FIRST OF ALL thanks alot for really quick reply.
Well i tried almost everything in it like css, css3, html, javascript, jquery, php etc and everything works perfect, just there are two problems.

i-- the result is very small (i hope it is changeable with css)
ii-- sometimes the button doesn't work, like you post the code and then click on it, it doesn't work. but in 20 tests it happened only 2 times with me and i have no clue why did this happen.

At the end i would say, it was really really good to see such small script so much effective, you must be very smart person. Thanks alot ^_^

As I told you I did it quick so I did not take much time in testing all of it. I could have designed a well css.

In all cases I will take a look at it and post a better version in a day or two.

cryoffalcon
03-16-2012, 07:36 AM
Thanks for your time and effort, i know you are not going to receive something for it and you don't have anything in your signature as a promotion or backlink, so overall its a pure good deed. I appreciate that cause we beginners grow because of you people.
Take Care.

ckeyrouz
03-16-2012, 02:48 PM
Thanks for your time and effort, i know you are not going to receive something for it and you don't have anything in your signature as a promotion or backlink, so overall its a pure good deed. I appreciate that cause we beginners grow because of you people.
Take Care.

It is the same chain buddy. No one ever grew out of nothing.
Each and every one started by learning and learning from others and got help from others until he became at a certain point capable of helping others.

It would be very bad to stop the chain.

cryoffalcon
03-16-2012, 08:41 PM
very soon i will try to become part of this chain, just as i get settled with few things ^_^ and without a doubt i have learnt alot from people, actually all that i know is because of that :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum