Put cursor in the text area when opening wiki/edit

This commit is contained in:
Alexey Verkhovsky 2005-11-13 17:48:21 +00:00
parent 07b7d9210a
commit 1f07ec78de
2 changed files with 3 additions and 1 deletions

View file

@ -14,7 +14,7 @@
%> %>
<p> <p>
<textarea name="content" style="width: 450px; height: 500px"><%= h(@flash[:content] || @page.content) %></textarea> <textarea name="content" id="content" style="width: 450px; height: 500px"><%= h(@flash[:content] || @page.content) %></textarea>
</p> </p>
<p> <p>
<input type="submit" value="Submit" accesskey="s"/> as <input type="submit" value="Submit" accesskey="s"/> as
@ -35,4 +35,5 @@ function cleanAuthorName() {
document.getElementById('authorName').value = 'AnonymousCoward'; document.getElementById('authorName').value = 'AnonymousCoward';
} }
} }
document.forms["editForm"].elements["content"].focus();
</script> </script>

View file

@ -30,4 +30,5 @@ function cleanAuthorName() {
document.getElementById('authorName').value = 'AnonymousCoward'; document.getElementById('authorName').value = 'AnonymousCoward';
} }
} }
document.forms["editForm"].elements["content"].focus();
</script> </script>