PDA

View Full Version : Question: JS Array To dataBase by asp.net



fdi
12-31-2007, 04:39 AM
hello all

I have javascript array in asp.net Page, I need to store the array data into database
how can I do it.

can I send the array data in queryString ,how?
OR
what is the best way to do that ?

I hope it's clear


thanks all

fdi
12-31-2007, 12:20 PM
Any reference or guidance ?

fdi
01-02-2008, 09:37 PM
Hello every body

I tried to store array values within hidden fields but the javascript do not identify the value attribute

******************************

document.getElementById('hdn').value

********************************

I tried this code but does not work



*************************************************************

var _NEW="<table ><tr><td colspan='2'><img src='images/wehdat.png'></img></td></tr><tr><td rowspan=2>THERE</td><td> Look over</td></tr></table>";
var playerId= new Array ;
var n=0;
function AddPlayer(playerNo,playerSt)
{
for(var i=1;i<=2;i++)
{
if(document.getElementById('imgGoalKeeper_'+i))
{
document.getElementById('goalKeeper_'+i).innerHTML=_NEW ;
n++;
playerId[n]=playerNo;
//alert(playerId[n]);
break;
}
else {continue;}
}
}
function storeArray()
{
for(var i=1;i<=15;i++)
{
document.getElementById('hdn'+i).value = playerId[i];
}
}

*************************************************************

please help, I need your help