Load a fiddle from POST
by dandiebolt
HTML
<h2>Load a fiddle based on the POST variables</h2>
<form method='post' action='http://jsfiddle.net/api/post/mootools/1.2/dependencies/more/' target='check'>
<p><input type='submit'/> - fiddle will be loaded in different browser window/tab.</p>
<label>HTML:</label>
<textarea name='html'><p class="red">It's magic!</p>
<p><a href="http://doc.jsfiddle.net/api/post.html">Documentation</a></p></textarea>
<label>JavaScript:</label>
<textarea name='js'>window.addEvent('domready', function() {
$$('p.red').each(function(el) {
el.setStyle('color', '#00ff00');
});
});</textarea>
<label>CSS:</label>
<textarea name='css'>p {font-family: Helvetica, Arial; }</textarea>
<label>Title:</label>
<input type='text' name='title' value='some title'/>
<label>Description:</label>
<textarea name='description'>descr</textarea>
<label>Resources (comma separated, no spaces):</label>
<textarea name='resources'>http://abc.it/xyz.js</textarea>
<label>DTD:</label>
<input type='text' name='dtd' value='html 4'/>
</form>
CSS
body { font-family: Helvetica, Tahoma; }
h2 { font-size: 1.5em; margin-bottom: 10px; display: block;}
p { margin-bottom: 15px; display: block; font-size: 0.8em; }
label { font-weight: bold; }
textarea, input[type=text] {
padding: 3px 5px;
width: 80%;
display: block;
border: 1px solid #ddd;
margin-bottom: 5px;
}
textarea { height: 70px; }