Created
April 29, 2010 18:36
-
-
Save JonasNielsen/384018 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* FORM */ | |
<form action="/topics" id="new_topic_form" method="post" onsubmit="new Ajax.Request('/topics', {asynchronous:true, evalScripts:true, method:'post', onComplete:function(request){Form.Element.enable('add_topic_submit')}, onLoading:function(request){Form.Element.disable('add_topic_submit')}, parameters:Form.serialize(this)}); return false;"> | |
<div style="margin:0;padding:0;display:inline"> | |
<input name="authenticity_token" type="hidden" value="6sukkqZzoOtj09Z/vJvkgn00m5PrbdjG3n7DFffaQA0=" /> | |
</div> | |
<input id="topic_slideshow_id" name="topic[slideshow_id]" type="hidden" value="107" /> | |
<label for="topic_title">Title</label> | |
<br /> | |
<input id="new_topic_title_field" name="topic[title]" size="30" type="text" /> | |
<br /> | |
<input class="button" id="add_topic_submit" name="commit" type="submit" value="Add Topic" /> | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Javascript */ | |
function show_hidden_box(box_id){ | |
$(box_id).slideDown({duration: 0.6}); | |
} | |
function show_hidden_box_and_focus(box_id, focus_on_field){ | |
show_hidden_box(box_id); | |
$('new_topic_title_field').activate(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment