title: How to rerender part of page after ajax submit of form in Lift (Scala)
body: <p>this is probably a stupid question but I cannot figure out how to do it.
  So I'm new to Scala/Lift and I read the ajax form chapter in <a href="http://simply.liftweb.net/index-4.8.html#toc-Section-4.8" rel="nofollow">http://simply.liftweb.net/index-4.8.html#toc-Section-4.8</a> but the "RedirectTo" in the example does not seem to be very "ajaxian" to me. Often in case of submitting a form via ajax, you would just partially rerender the same page, right?
  So that's what I'm trying to do and am completely failing right now.
  How do I let Lift rerender just a part of the same page after I submit the form via ajax?</p>
  
  <p>Any hints would be appreciated. Thanks.</p>
  
  <p>Basically, what I have looks like this:</p>
  
  <pre><code>    &lt;div id="main" class="lift:surround?with=default;at=content"&gt;
      &lt;h2&gt;Welcome to your project!&lt;/h2&gt;
      &lt;div class="lift:Test"&gt;
          &lt;div&gt;
              &lt;form class="lift:form.ajax"&gt;
                  &lt;fieldset&gt;
                      &lt;label for="name"&gt;Name:&lt;/label&gt;
                      &lt;input id="name" name="name" type=text&gt;
                      &lt;p&gt;&lt;/p&gt;
                      &lt;input id="save" type="submit" value="Save"&gt;
                  &lt;/fieldset&gt;
              &lt;/form&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;span id="theName"&gt;Name&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  
  class Test {
  
    def render = {
      var name = ""
  
      def process(): JsCmd = {
        Thread.sleep(500)
  
        S.notice("Entered name is: %s".format(name))
        Noop
      }
  
      "#theName " #&gt; "This shall be updated with the name given in the form above" &amp; 
      "#name" #&gt; (SHtml.text(name, name = _) ++ SHtml.hidden(process))
    }
  }
  </code></pre>
  
  <p>How would I update "theName" when submitting the form?</p>