[Phpmyadmin-devel] Problem in getting values from the url

Marc Delisle marc at infomarc.info
Fri Jul 24 13:57:27 CEST 2009


Zahra Naeem a écrit :
> Hi all,
>         I am using the following piece of code in my java script file to 
> retrieve the ids of checked check boxes from a div named "list".
> I am appending the arrays of ids in the url using the "location.href = 
> location.href+"?array=true&0="+course;" etc. I can see the array in the 
> address bar but using $REQUEST or $GET does not help me fetch the values. 
>  
> Please have a look at my code and help me as soon as possible. This 
> problem has already taken a lot of my time.
> Thanx in advance.
>  
> function ApplySelectedChanges()
> {      
>     var Checked_tables_ids = new Array();
>    
>     var div =  document.getElementById("list");
>     var input_fields = div.getElementsByTagName('input');
>     var x = input_fields.length;
>     var i;
>     var append_string;
>     for (i=0; i<x; i++) {
>         if (input_fields[i].type == 'checkbox') { 
>              if (i == 0) {
>                   append_string = "?abc="+1234+"&";  
>              } else {
>                   append_string += "&";    
>              }
>         Checked_tables_ids[i] = input_fields[i].id;
>         append_string += i+"="+input_fields[i].id; 
>         }
>    } 
>    location.href += append_string;
> }

I did not analyse your code, but if you look at $_REQUEST very early in 
the script (at the very beginning) I bet you'll see your values. They 
are probably "cleaned" because you might have forgotten to include the 
current token in your URL. See libraries/url_generating.lib.php.


-- 
Marc Delisle
http://infomarc.info




More information about the Developers mailing list