Ajax Talk - Asynchronous javascript and xml discussion board
 FAQ   Search    Usergroups      Register   Profile   Check your messages   Log in 
Signup now to enjoy a range of free membership advantages !!
Ajax Talk - Moderators Wanted
Hi all, Urgent reply needed

 
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX general discussion
View previous topic :: View next topic  
Author Message
bnvpavan
New one
New one


Joined: 03 Dec 2008
Posts: 1

PostPosted: Wed Dec 03, 2008 7:21 am    Post subject: Hi all, Urgent reply needed Reply with quote

for
Code:
<%@ page language="java" %>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
                    <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
                    <%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %><html>
<head>
<title>Sample Struts Application</title>
<script type="text/javascript">
function ajaxFunction()
{var xmlHttp;
try
  {  // Firefox, Opera 8.0+, Safari
xmlHttp=new XMLHttpRequest();
}
catch (e)
  {  // Internet Explorer
try
    {    xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");    }
  catch (e)
    {    try
      {      xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");      }
    catch (e)
      {      alert("Your browser does not support AJAX!");      return false;      }    }  } 
//var params = "Login=%25&Passwo=%26";
var params="Login="+encodeURIComponent("%")+"&"+"Passwo="+encodeURIComponent("&");
   xmlHttp.open("GET","ControllerServlet.do?Login=%2525&Passwo=%25&againPasswo=%",true);
//         xmlHttp.open("POST","ControllerServlet.do",true);
xmlHttp.setRequestHeader("Content-type", "multipart/form-data; charset=UTF-8;");
//xmlHttp.setRequestHeader("Content-transfer-encoding","8bit");

//xmlHttp.setRequestHeader("Content-length", params.length);
//xmlHttp.setRequestHeader("Connection", "close");

xmlHttp.send(null);

//document.write("Loading....!");
   }

   </script>
</head>
<body>
<!--  <form  action="ControllerServlet.do?Login=%2525&Passwo=%26" method="get"> -->
    <table width="80%" border="0">
   
     <tr><input type="button" value="Click Me" onclick="ajaxFunction()"/></tr>
    </table>
<!--  </form> -->
</body>
</html> 


the ajax sen(null); method
sends the decoded values of url as parameter to my servlet
is there any option to setRequstHeader()
to avoid decoding the parameters

please reply me as soon as possible.. Sad Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Ajaxtalk.com Forum Index -> AJAX general discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
 Advertisements
 XML & Copyright Notice 
    


Powered by phpBB © 2001, 2005 phpBB Group

What is according to Wikipedia: Ajax Web2.0 XML E4X


Link to our site:

  


del.icio.us digg spurl wists simpy newsvine blinklist furl blogmarks yahoo! myweb smarking ma.gnolia segnalo reddit fark technorati cosmos


Normal Bookmark


Partner Button Links:
Codecrunch.com: Webmaster Tutorials    One Ajax


Partner Text Links:
quomon | web20log | ajaxmatters | tableless | 456bereastreet | music charts | gift ideas | competitions | free xbox 360 | link trade ?


Credits:
it consultancy & project management lead generation zoekmachine optimalisatie steal these buttons seo expert