Tip: Click lines to highlight, hold ctrl/cmd to multi-select
http://codedumper.com/asepi (27-Jul @ 16:44)
Syntax Highlighted Code
- <link type="text/css" rel="stylesheet" href="/stylesheets/main.css"/>
- <script src="js/jquery-1.2.6.pack.js" type="text/javascript"></script>
- <script type="text/javascript">
- <!--
- function chaseTerm(term){
- $.post("/ajaxresults", {content: term}, function(data){
- $("#results").replaceWith(data);
- });
- };
- -->
- </script>
- </head>
- <div id="results" class="results">
- {% if synonyms or antonyms %}
- {% if synonyms %}
- <h3>Synonyms are:</h3>
- {% for syn in synonyms %}
- <span id="resultword" class="synonym">
- <a href="#" onclick="chaseTerm('{{syn}}')">{{ syn|escape }}</a>
- </span>
- {% endfor %}
- {% endif %}
- {% if antonyms %}
- <h3>Antonyms are:</h3>
- {% for ant in antonyms %}
- <span id="resultword" class="antonym">{{ ant|escape }}</span>
- {% endfor %}
- {% endif %}
- {% else %}
- <h3>There were no results!</h3>
- {% endif %}
- </div>
- <h3>Gimme another single word (for now)</h3>
- <form action="/results" method="post">
- <input name="content" rows="1" cols="60"></input>
- <input type="submit" value="Help Me!"></input>
- </div>
- </form>
- </body>
- </html>
Plain Code
<html>
<head>
<link type="text/css" rel="stylesheet" href="/stylesheets/main.css"/>
<script src="js/jquery-1.2.6.pack.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function chaseTerm(term){
$.post("/ajaxresults", {content: term}, function(data){
$("#results").replaceWith(data);
});
};
-->
</script>
</head>
<body>
<div id="results" class="results">
<h2>You searched for <span class="searchText">{{searchText}}</span></h2>
{% if synonyms or antonyms %}
{% if synonyms %}
<h3>Synonyms are:</h3>
{% for syn in synonyms %}
<span id="resultword" class="synonym">
<a href="#" onclick="chaseTerm('{{syn}}')">{{ syn|escape }}</a>
</span>
{% endfor %}
{% endif %}
{% if antonyms %}
<h3>Antonyms are:</h3>
{% for ant in antonyms %}
<span id="resultword" class="antonym">{{ ant|escape }}</span>
{% endfor %}
{% endif %}
{% else %}
<h3>There were no results!</h3>
{% endif %}
</div>
<h3>Gimme another single word (for now)</h3>
<form action="/results" method="post">
<div>
<input name="content" rows="1" cols="60"></input>
<input type="submit" value="Help Me!"></input>
</div>
</form>
</body>
</html>