• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 477
  • Last Modified:

How to hide variables in the url javascript?

Hi,

I have this url:
http://test.html?mode=test&formdate1=04%2F13%2F09&formdate2=04%2F19%2F09

I dont want to display formdate1 and formdate2 variable and values in the url. Would you please hide it using javascript.

Thanks
0
Saroj13
Asked:
Saroj13
  • 2
1 Solution
 
Kalpana_NatarajanCommented:
You can set the form action to be Post instead of Get, That will hide the parameter strings.

Else, if you are using C#, as your backend, then use the Server.Transfer method to your new result page, which will not only hide the request string, but also the .aspx nam eof the new page you are opening.

Regards,
Kalpana
0
 
Saroj13Author Commented:
I need to use get method only. also, i am not using c#.
0
 
Kalpana_NatarajanCommented:
Then use Ajax XMlHttpRequest and the XMLHttpResponse object to track page state changes.

The following page has a simple example:
http://www.degraeve.com/reference/simple-ajax-example.php

(page courtesy www.degraeve.com - the first hit when search for "Simple Ajax Example" by Google)


Regards,
Kalpana
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now