Skip to content

Commit 8f051a7

Browse files
author
patched.codes[bot]
committed
Patched introduction/templates/Lab/A9/a9_lab2.html
1 parent 9a9e2b2 commit 8f051a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

introduction/templates/Lab/A9/a9_lab2.html

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ <h4>Some Example</h4>
1919
</ul>
2020

2121
<form enctype="multipart/form-data" id="a9_form2" method="POST" style="display: flex;flex-direction: column;align-items: center;margin-bottom: 50px;">
22+
{% csrf_token %}
2223
<input type="file" name="file" id="a9_file" />
2324
<input type="text" name="function" id="a9_function" placeholder="function"/>
2425
<button type="submit" id="a9_submit" >Submit</button>
2526
</form><br><br>
2627

28+
2729
{% if success %}
2830
<div id="img_container" style="margin-bottom : 50px">
2931
<img src='data:image/jpeg;base64,{{img_str_ref}}' style="width: 48%"/>
@@ -88,7 +90,11 @@ <h4>Some Example</h4>
8890
form.submit();
8991
}
9092
{% if error %}
91-
alert("{{ data }}");
93+
<input type="hidden" id="data" value="{{ data }}">
94+
<script>
95+
alert(document.getElementById("data").value);
96+
</script>
97+
9298
{% endif %}
9399

94100
</script>

0 commit comments

Comments
 (0)