Form Submit, Post Method showing form Values in URL

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RamananKalirajan
    Contributor
    • Mar 2008
    • 608

    #1

    Form Submit, Post Method showing form Values in URL

    Hi All,
    I am having a form with post method. When I submit the form.. the Form Input values are shown in the url. Generally, In post method the values are posted in the body. "Get" method only shows the values in the url. I dont want to display my form input values in the url. What should I do. Any suggestions will be helpful.

    Thanks and Regards
    Ramanan Kalirajan
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    from what you describe, you’re sending get data. post the code so that we can have a look (too many possibilities).

    Comment

    • RamananKalirajan
      Contributor
      • Mar 2008
      • 608

      #3
      Hi Dormilich, Sorry I found the mistake. It was my Friend who wrote the code and without examining the code I posted the code. He explicitly set the values in the url. Thats y i was able to see the form values in the url.
      Code:
      function loginvalidator()
      {
      alert("in the login");
      var username = document.getElementById('usrName').value;
      var password = document.getElementById('usrPwd').value;
      this.document.formLogin.action = "loginvalidator.exc?username="+username+"&password="+password;	
      this.document.formLogin.method = "post";
      this.document.formLogin.submit();
      }
      This was the code, which was making the form variables to be displayed in the url. I know how to resolve this. I am sorry for posting without seeing my mistake and thanks for those who tried to findout the problem.

      Thanks and Regards
      Ramanan Kalirajan

      Comment

      • Dormilich
        Recognized Expert Expert
        • Aug 2008
        • 8694

        #4
        Originally posted by RamananKaliraja n
        I am sorry for posting without seeing my mistake and thanks for those who tried to findout the problem.
        no problem, do you wanna guess how many times I found the solution just by making a last minute check just before posting?

        Comment

        • RamananKalirajan
          Contributor
          • Mar 2008
          • 608

          #5
          Let me Guess.. 10% of ur total Post 340 times... A guess :-P. Thanks Man

          Thanks and Regards
          Ramanan Kalirajan

          Comment

          • Dormilich
            Recognized Expert Expert
            • Aug 2008
            • 8694

            #6
            Originally posted by RamananKaliraja n
            Let me Guess.. 10% of ur total Post 340 times... A guess :-P.
            let’s say 10% of my started threads.

            Comment

            Working...