Question

I am using this:

document.location ='my different asp.net page?=myparams'

Is there a way to hide the values of the params in the URL displayed on the browser?

I know I could use hidden Form values and I know I can encrypt the values (which is what I will do if no joy here).

Is there a simpler tidier way of doing this? Perhaps via JQuery.

Was it helpful?

Solution

If you are just trying to hide the url parameters from the address bar in the browser then you could use an iframe.

OTHER TIPS

One solution is to set document.location to a second page, that page keep param values in a session variable and redirect to your desired one.

document.location = "redirectpage.php?param=value"

In redirectpage.php

$_SESSION['param']=$_GET['param]; header('Location: ' . desired_page?param=value);

By this way, value of param will be only displayed in a very short time when redirectpage.php redirecting to desired page.

Hope it helps

Btw, can you explain how hidden Form works in this case?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top