I have a form 'G' with a selectbox and an inputbox.
The selectbox contains 20 usernames.
The inputbox contains a date (=tot). Next to it is a button.
The selectbox uses an onchange event to launch the function jumpoff.
onchange="jumpo ff(this, 'gebruiker')";
The inputbox uses an onclick event to invoke the same function.
onclick="jumpof f(document.G.to t,'datum');"
Inside the jumpoff function :
If it is a date then I reorder the dateparts and assign to x.
If it is not I simply assign the value to x.
Notice the alert function : it proves to me that the compounded string is
correct IN BOTH situations, ie I get both
contractsearch. php?usr=gebruik er&geselecteerd =ADR
as well as
contractsearch. php?usr=datum&g eselecteerd=200 40326
The very same string is used in a location method to call this phpscript.
The phpscript expects the values to arrive using GET.
Here is the problem : it only receives them when the selectbox changes.
If the inputbox/button is used, POST variables arrive in the script.
var_dump proves this :
Using the selectbox, var_dump($_GET) yields as expected
array(2) { ["usr"]=> string(9) "gebruiker" ["geselectee rd"]=> string(3)
"ADR" }
Using the inputbox/button, var_dump($_GET) yields
array(2) { ["tot"]=> string(10) "26/03/2004" ["Submit"]=> string(4)
"Zoek"}. These are POST values.
As I said earlier the alert function gives me this:
contractsearch. php?usr=datum&g eselecteerd=200 40326
I have no clue.
Thx
Ward
function jumpoff(obj,par am) {
var x,y;
if (obj.type=="sel ect-one")
{x=obj.options[obj.selectedInd ex].value;}
else
{y=obj.value;
x=y.substr(6,4) +y.substr(3,2)+ y.substr(0,2);}
alert ('contractsearc h.php?usr='+par am+'&geselectee rd='+x);
parent.frames['main'].location='cont ractsearch.php?
usr='+param+'&g eselecteerd='+x ;
}
The selectbox contains 20 usernames.
The inputbox contains a date (=tot). Next to it is a button.
The selectbox uses an onchange event to launch the function jumpoff.
onchange="jumpo ff(this, 'gebruiker')";
The inputbox uses an onclick event to invoke the same function.
onclick="jumpof f(document.G.to t,'datum');"
Inside the jumpoff function :
If it is a date then I reorder the dateparts and assign to x.
If it is not I simply assign the value to x.
Notice the alert function : it proves to me that the compounded string is
correct IN BOTH situations, ie I get both
contractsearch. php?usr=gebruik er&geselecteerd =ADR
as well as
contractsearch. php?usr=datum&g eselecteerd=200 40326
The very same string is used in a location method to call this phpscript.
The phpscript expects the values to arrive using GET.
Here is the problem : it only receives them when the selectbox changes.
If the inputbox/button is used, POST variables arrive in the script.
var_dump proves this :
Using the selectbox, var_dump($_GET) yields as expected
array(2) { ["usr"]=> string(9) "gebruiker" ["geselectee rd"]=> string(3)
"ADR" }
Using the inputbox/button, var_dump($_GET) yields
array(2) { ["tot"]=> string(10) "26/03/2004" ["Submit"]=> string(4)
"Zoek"}. These are POST values.
As I said earlier the alert function gives me this:
contractsearch. php?usr=datum&g eselecteerd=200 40326
I have no clue.
Thx
Ward
function jumpoff(obj,par am) {
var x,y;
if (obj.type=="sel ect-one")
{x=obj.options[obj.selectedInd ex].value;}
else
{y=obj.value;
x=y.substr(6,4) +y.substr(3,2)+ y.substr(0,2);}
alert ('contractsearc h.php?usr='+par am+'&geselectee rd='+x);
parent.frames['main'].location='cont ractsearch.php?
usr='+param+'&g eselecteerd='+x ;
}
Comment