havey
04-24-2003, 02:13 PM
I have a url as such:
TotalPointScore.htm?ada=87,(age=8),(edu=16),(occ=14),(gua=10),(reg=5),(cat=16),(lan=8),(ada=10)
Now how can i think that i so far have parsed the URL data into an array of all the entries and their respective values.
this is what i have so far: (how can i access the array to get the desc = with value and display it in the html?)... so in the html it would display ,for example, age is 8
function parseAllEntries(){
var temp = data.split(",");
var dataArr = new Array();
z=0;
for(n=0;n<temp.length;n++){
var str = temp[n];
var desc = str.substring(1,str.indexOf("="));
var value = str.substring(str.indexOf("=")+1,str.length-1);
if(n>0){
dataArr[z] = new Array(desc,value);
z++
}
}
dataArr[0][0]+", "+dataArr[0][1]
}
// End -->
TotalPointScore.htm?ada=87,(age=8),(edu=16),(occ=14),(gua=10),(reg=5),(cat=16),(lan=8),(ada=10)
Now how can i think that i so far have parsed the URL data into an array of all the entries and their respective values.
this is what i have so far: (how can i access the array to get the desc = with value and display it in the html?)... so in the html it would display ,for example, age is 8
function parseAllEntries(){
var temp = data.split(",");
var dataArr = new Array();
z=0;
for(n=0;n<temp.length;n++){
var str = temp[n];
var desc = str.substring(1,str.indexOf("="));
var value = str.substring(str.indexOf("=")+1,str.length-1);
if(n>0){
dataArr[z] = new Array(desc,value);
z++
}
}
dataArr[0][0]+", "+dataArr[0][1]
}
// End -->