Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post

    How to get this type of tryit editor

    Hi,
    well i saw this editor http://www.w3schools.com/svg/tryit.a...=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

  • #2
    Senior Coder ckeyrouz's Avatar
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Posts
    1,044
    Thanks
    5
    Thanked 179 Times in 179 Posts
    I created a quick sample of an HTML editor. try it
    Code:
    <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>
    Software and cathedrals are much the same - first we build them, then we pray.

  • #3
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post
    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 ^_^

  • #4
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post
    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 "WELL SAID"

  • #5
    Senior Coder ckeyrouz's Avatar
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Posts
    1,044
    Thanks
    5
    Thanked 179 Times in 179 Posts
    Quote Originally Posted by cryoffalcon View Post
    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.
    Software and cathedrals are much the same - first we build them, then we pray.

  • #6
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post
    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.

  • #7
    Senior Coder ckeyrouz's Avatar
    Join Date
    Jun 2009
    Location
    Montreal, Canada
    Posts
    1,044
    Thanks
    5
    Thanked 179 Times in 179 Posts
    Quote Originally Posted by cryoffalcon View Post
    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.
    Software and cathedrals are much the same - first we build them, then we pray.

  • #8
    Regular Coder
    Join Date
    Oct 2010
    Posts
    157
    Thanks
    2
    Thanked 1 Time in 1 Post
    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


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •