28 lines
1.5 KiB
HTML
28 lines
1.5 KiB
HTML
{% extends "index.html" %}
|
|
{% block main %}
|
|
<article class='left'>
|
|
<h3>Get HTML response from AJAX</h3>
|
|
<p>Click the refresh button to get the HTML response.</p>
|
|
<p>The response may randomly be an error response so you should try it more than once.</p>
|
|
<input type='button' class='refresh' value=' ' onclick='javascript:get_html_from_ajax(document.getElementById("html_container"), "/get_html_from_ajax");'>
|
|
</article>
|
|
<article class='right' id='html_container'>
|
|
</article>
|
|
<section class='inline'>
|
|
<article class='left'>
|
|
<h3>Set value via AJAX</h3>
|
|
<p>Send value to the application.</p>
|
|
<p>If value is empty or is "We Make Porn" (case sensitive), an error is raised.</p>
|
|
<input type='text' id='value_sender'>
|
|
<input type='button' value="Try me" onclick='javascript:set_value_from_ajax(document.getElementById("value_sender"), "/set_value_from_ajax", "TETA_ERR");'>
|
|
</article>
|
|
<article class='right'>
|
|
<h3>Get value from AJAX</h3>
|
|
<p>Get a random value from the application.</p>
|
|
<p>Value may randomly be unavailable raising an error so you should try it more than once.</p>
|
|
<input type='text' id='value_receiver'>
|
|
<input type='button' value="Try me" onclick='javascript:get_value_from_ajax(document.getElementById("value_receiver"), "/get_value_from_ajax", "TETA_ERR");'>
|
|
</article>
|
|
</section>
|
|
{% endblock %}
|