title: how can i pass value from javascript .tpl page to normal php page in smarty
body: <pre><code>header.tpl(within /templetes)
  
  ---------------------------------------------
  &lt;HTML&gt;
  &lt;HEAD&gt;
  &lt;TITLE&gt;{$title}&lt;/TITLE&gt;
  {literal}
  &lt;style type="text/css"&gt;
  body{
  font-family:Arial, Helvetica, sans-serif;
  font-size:12px;
  color:#333333;
  }
  &lt;/style&gt;
  &lt;script src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="http://jzaefferer.github.com/jquery-validation/jquery.validate.js"&gt;&lt;/script&gt;
  &lt;style type="text/css"&gt;
  * { font-family: Verdana; font-size: 96%; }
  label { width: 10em; float: left; }
  label.error { float: none; color: red; padding-left: .5em; vertical-align: top; }
  p { clear: both; }
  .submit { margin-left: 12em; }
  em { font-weight: bold; padding-right: 1em; vertical-align: top; }
  &lt;/style&gt;
  
  
    &lt;script type="text/javascript" language="javascript"&gt;
    $(document).ready(function(){
      $("#commentForm").validate();
                                   });
  
    function ajaxFunction(){
   var ajaxRequest;  // The variable that makes Ajax possible!
  
   try{
     // Opera 8.0+, Firefox, Safari
     ajaxRequest = new XMLHttpRequest();
   }catch (e){
     // Internet Explorer Browsers
     try{
        ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");
     }catch (e) {
        try{
           ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");
        }catch (e){
           // Something went wrong
           //alert("Your browser broke!");
           return false;
        }
     }
   }
   // Create a function that will receive data 
   // sent from the server and will update
   // div section in the same page.
   ajaxRequest.onreadystatechange = function(){
     if(ajaxRequest.readyState == 4){
        var ajaxDisplay = document.getElementById('ajaxDiv');
        ajaxDisplay.value = ajaxRequest.responseText;
     }
   }
   // Now get the value from user and pass it to
   // server script.
   var cname = document.getElementById('cname').value;
   var lname = document.getElementById('lname').value;
   var date = document.getElementById('date').value;
  
   var queryString = "?cname=" + cname ;
   queryString +=  "&amp;lname=" + lname + "&amp;date=" + date;
  
  ajaxRequest.onreadystatechange=stateChanged;
  ajaxRequest.open("POST","demo/process.php?cname="+cname+"&amp;lname="+lname+"&amp;date="+date,true);
  ajaxRequest.send(null); 
  
  }
  
  
    &lt;/script&gt;
  
  {/literal}
  &lt;/HEAD&gt;
  &lt;BODY &gt;
  </code></pre>
  
  <h2>index.tpl like following</h2>
  
  <pre><code>{include file="header.tpl" title= $title }
  &lt;h1&gt;Login Form&lt;/h1&gt;
  &lt;form class="cmxform" id="commentForm" &gt;
   &lt;fieldset&gt;
  
     &lt;p&gt;
       &lt;label for="cname"&gt; First Name&lt;/label&gt;
       &lt;em&gt;*&lt;/em&gt;&lt;input id="cname" name="cname" size="25" class="required" minlength="2" /&gt;
     &lt;/p&gt;
     &lt;p&gt;
       &lt;label for="lname"&gt;Last Name&lt;/label&gt;
       &lt;em&gt;*&lt;/em&gt;&lt;input id="lname" name="lname" size="25"  class="required" /&gt;
     &lt;/p&gt;
     &lt;p&gt;
       &lt;label for="Date"&gt;Date&lt;/label&gt;
       &lt;em&gt;*&lt;/em&gt;&lt;input id="date" name="date" size="25"  class="required" value="" /&gt;
     &lt;/p&gt;
  
     &lt;p&gt;
     &lt;input class="submit" type="submit" value="Submit" class="button" onclick='ajaxFunction()' /&gt;
     &lt;/p&gt;
   &lt;/fieldset&gt;
   &lt;/form&gt;
  </code></pre>
  
  <p>now i want to get the cname,lname,date in process.php. unfortuantely i am not getting it i tried lot</p>
  
  <p>when i sumit in index.php i am not getting any values please guide me..........</p>