1

Topic: How it is hidden parameter passing?

As it is possible it is hidden parameter passing at

document.location = "test.jsp? acc =" + acc;

. It is necessary that the link worked but in an address line did not show parameters. Now the link works page opens but I can not hide parameters.

2

Re: How it is hidden parameter passing?

Rustam Ergashev;
Make through POST.

3

Re: How it is hidden parameter passing?

Rustam Ergashev;
On a server we read parameters, we write down in page (for example, the latent fields), or in session and we do a redirect on this page without parameters.
Or post.

4

Re: How it is hidden parameter passing?

DarkMaster wrote:

Rustam Ergashev;
Make through POST.

I already did but it did not turn out. On true from for that that  becomes from external function. It was the function slice javascript. On the form there is method POST.

5

Re: How it is hidden parameter passing?

hVostt wrote:

Rustam Ergashev;
On a server we read parameters, we write down in page (for example, the latent fields), or in session and we do a redirect on this page without parameters.
Or post.

Interesting, on more in detail it is possible. In PHP session did but on JSP  did not do.

6

Re: How it is hidden parameter passing?

Rustam Ergashev wrote:

it is interesting, on more in detail it is possible. In PHP session did but on JSP  did not do.

It not to me, and a forum another smile

7

Re: How it is hidden parameter passing?

Rustam Ergashev wrote:

it is passed...
I already did but it did not turn out. On true from for that that  becomes from external function. It was the function slice javascript. On the form there is method POST.

If it is fair - it is puzzled that there can it does not turn out.

//before submit - to place parameters in hidden form fields
document.getElementById ("myForm").submit ();

8

Re: How it is hidden parameter passing?

Rustam Ergashev wrote:

As it is possible it is hidden parameter passing at

document.location = "test.jsp? acc =" + acc;

. It is necessary that the link worked but in an address line did not show parameters. Now the link works page opens but I can not hide parameters.

Send method POST

9

Re: How it is hidden parameter passing?

DarkMaster wrote:

it is passed...
If it is fair - it is puzzled that there can it does not turn out.

//before submit - to place parameters in hidden form fields
document.getElementById ("myForm").submit ();

On the form there is button Submint it serves for the authorization form, it causes function on javascript (in an exterior file.js), Javascript function transfers parameters and causes procedure of Orakla in jsp a file. The form on jsp.  returns result in function on javascript (which  request). If the result succes that is done  here by this function

function autoUser () {
if (! verifyInputs ()) {
return;
}
$.ajax ({
dataType: ' html ';
data: {
request: ' autoUser ';
login: document.fm.login.value;
password: document.fm.phone.value
};
success: function (data) {
document.location = "test.jsp? id =" + document.fm.login.value;
};
error: function (xhr, ajaxOptions, thrownError) {
$(' #userMessage ').removeClass (' info ').text (xhr.responseText);
}
});
}

Not my code.

10

Re: How it is hidden parameter passing?

Rustam Ergashev;

function autoUser () {
if (! verifyInputs ()) {
return;
}
$.ajax ({
dataType: ' html ';
data: {
request: ' autoUser ';
login: document.fm.login.value;
password: document.fm.phone.value
};
success: function (data) {
//in document.fm - already there is the filled data, therefore at once POST.
document.fm.submit ();
//document.location = "test.jsp? id =" + document.fm.login.value;
};
error: function (xhr, ajaxOptions, thrownError) {
$(' #userMessage ').removeClass (' info ').text (xhr.responseText);
}
});
}

11

Re: How it is hidden parameter passing?

DarkMaster;
But in me submint causes function autoUser (), the cycle does not turn out?

12

Re: How it is hidden parameter passing?

Rustam Ergashev;
What hinders to change action at the form?

document.fm.action = "test.jsp";
document.fm.submit ();

13

Re: How it is hidden parameter passing?

DarkMaster;
Made, Received an error
document.fm.submit is not a function
success
handleSuccess
ajax/w.onreadystatechange
ajax
autoUser
onclick
action exchanged but other form it was not launched
action = "test.jsp? acc=123"