diff options
author | maheshgudi | 2017-11-17 17:54:22 +0530 |
---|---|---|
committer | maheshgudi | 2017-11-17 17:54:22 +0530 |
commit | 20a630bee1db9b2df6f0a820de40fe97d0703064 (patch) | |
tree | 582372c67f16d8c3a7aa48a1bd4274847a8f52b6 | |
parent | fa0548170cb8ee68508bc7286c65f9651f5718a1 (diff) | |
download | online_test-20a630bee1db9b2df6f0a820de40fe97d0703064.tar.gz online_test-20a630bee1db9b2df6f0a820de40fe97d0703064.tar.bz2 online_test-20a630bee1db9b2df6f0a820de40fe97d0703064.zip |
Position cursor automatically on text area during quiz
-rw-r--r-- | yaksh/templates/yaksh/question.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index af24778..83ee16b 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -165,19 +165,19 @@ lang = "{{ question.language }}" {% if question.type == "integer" %} Enter Integer:<br/> - <input name="answer" type="number" id="integer" value={{ last_attempt|safe }} /> + <input autofocus name="answer" type="number" id="integer" value={{ last_attempt|safe }} /> <br/><br/> {% endif %} {% if question.type == "string" %} Enter Text:<br/> - <textarea name="answer" id="string">{{ last_attempt|safe }}</textarea> + <textarea autofocus name="answer" id="string">{{ last_attempt|safe }}</textarea> <br/><br/> {% endif %} {% if question.type == "float" %} Enter Decimal Value :<br/> - <input name="answer" type="number" step="any" id="float" value={{ last_attempt|safe }} /> + <input autofocus name="answer" type="number" step="any" id="float" value={{ last_attempt|safe }} /> <br/><br/> {% endif %} @@ -207,7 +207,7 @@ lang = "{{ question.language }}" <a href="#answer" class="pull-right" onclick="reset_editor()" name="reset" id="reset">Undo Changes <span class="glyphicon glyphicon-refresh"></span></a> </div> </div> - <textarea name="answer" id="answer"></textarea> + <textarea autofocus name="answer" id="answer"></textarea> <br> {% endif %} <div class="from-group"> |