Want to get the example below to work with open("POST",url,true) instead of open("GET",url,true).
When I try that, the program doesn't seem to do anything when I click the buttons. The last try is commented out.
How do you get it to work with POST ?

Code:
<html>
   <head>
      <title>
      </title>
      <script language="javascript" type="text/javascript">
      <!--
         function f(fn,dv)
         {
            var req=false;
            if (window.XMLHttpRequest)
            {
               req=new XMLHttpRequest();
            }
            else
            {
               if (window.ActiveXObject)
               {
                  req=new ActiveXObject("Microsoft.XMLHTTP");
               }
            };
            if (req)
            {
               var fn1=fn+"?t="+Math.random();
               req.open("GET",fn1,true);
               //req.open("POST",fn1,true);
               //req.setRequestHeader("Content-type","application/x-www-form-urlencoded");
               req.onreadystatechange=function()
                                      {
                                         if (req.readyState==4 && req.status==200)
                                         {
                                            //var rt2=req.responseText;
                                            var rt2="<img src="+req.responseText+">";
                                            document.getElementById(dv).innerHTML=rt2;
                                            delete req;
                                            req=null;
                                         }
                                      };
               req.send(null);
               //req.send();
            }
            else
            {
               alert('No req.');
               return false;
            };
         }
      -->
      </script>
   </head>
   <body>
      <div id="dv1">
         <form>
            <input type="button" value="*" onclick="f('aa.txt','dv2');">
            <input type="submit" value="*">
         </form>
      </div>
      <div id="dv2">
      </div>
   </body>
</html>