Tip: Click lines to highlight, hold ctrl/cmd to multi-select

http://codedumper.com/asepi (27-Jul @ 16:44)

Syntax Highlighted Code

  1.     <head>
  2.       <link type="text/css" rel="stylesheet" href="/stylesheets/main.css"/>
  3.  
  4.         <script src="js/jquery-1.2.6.pack.js" type="text/javascript"></script>
  5.                
  6.         <script type="text/javascript">
  7.         <!--
  8.  
  9.         function chaseTerm(term){
  10.             $.post("/ajaxresults", {content: term}, function(data){
  11.                 $("#results").replaceWith(data);
  12.             });
  13.                        
  14.         };
  15.         -->
  16.         </script>
  17.  
  18.     </head>
  19.        
  20.    
  21.    
  22.         <div id="results" class="results">
  23.         <h2>You searched for <span class="searchText">{{searchText}}</span></h2>
  24.            
  25.         {% if synonyms or antonyms %}
  26.             {% if synonyms %}
  27.                 <h3>Synonyms are:</h3>
  28.                {% for syn in synonyms %}
  29.                     <span id="resultword" class="synonym">
  30.                             <a href="#" onclick="chaseTerm('{{syn}}')">{{ syn|escape }}</a>
  31.                     </span>    
  32.                    
  33.                 {% endfor %}
  34.             {% endif %}
  35.            
  36.             {% if antonyms %}
  37.                 <h3>Antonyms are:</h3>
  38.                {% for ant in antonyms %}
  39.                    <span id="resultword" class="antonym">{{ ant|escape }}</span>      
  40.                 {% endfor %}
  41.             {% endif %}
  42.         {% else %}
  43.             <h3>There were no results!</h3>    
  44.         {% endif %}
  45.  
  46.         </div>
  47.  
  48.  
  49.         <h3>Gimme another single word (for now)</h3>
  50.         <form action="/results" method="post">
  51.           <div>
  52.                     <input name="content" rows="1" cols="60"></input>
  53.                     <input type="submit" value="Help Me!"></input>
  54.                 </div>
  55.         </form>
  56.  
  57.   </body>
  58. </html>
  59.  

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>

Permalink: http://codedumper.com/asepi