Connecting Tech Pros Worldwide Forums | Help | Site Map

Form Submit, Post Method showing form Values in URL

RamananKalirajan's Avatar
Needs Regular Fix
 
Join Date: Mar 2008
Location: Chennai - India
Posts: 351
#1: 4 Weeks Ago
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's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,670
#2: 4 Weeks Ago

re: Form Submit, Post Method showing form Values in URL


from what you describe, you’re sending get data. post the code so that we can have a look (too many possibilities).
RamananKalirajan's Avatar
Needs Regular Fix
 
Join Date: Mar 2008
Location: Chennai - India
Posts: 351
#3: 4 Weeks Ago

re: Form Submit, Post Method showing form Values in URL


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.
Expand|Select|Wrap|Line Numbers
  1. function loginvalidator()
  2. {
  3. alert("in the login");
  4. var username = document.getElementById('usrName').value;
  5. var password = document.getElementById('usrPwd').value;
  6. this.document.formLogin.action = "loginvalidator.exc?username="+username+"&password="+password;    
  7. this.document.formLogin.method = "post";
  8. this.document.formLogin.submit();
  9. }
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
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,670
#4: 4 Weeks Ago

re: Form Submit, Post Method showing form Values in URL


Quote:

Originally Posted by RamananKalirajan View Post

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?
RamananKalirajan's Avatar
Needs Regular Fix
 
Join Date: Mar 2008
Location: Chennai - India
Posts: 351
#5: 4 Weeks Ago

re: Form Submit, Post Method showing form Values in URL


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

Thanks and Regards
Ramanan Kalirajan
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,670
#6: 4 Weeks Ago

re: Form Submit, Post Method showing form Values in URL


Quote:

Originally Posted by RamananKalirajan View Post

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

let’s say 10% of my started threads.
Reply