
May 21st, 2005, 03:41 AM
|
|
|
|
Join Date: Apr 2007
Location: Earth...
Posts: 19
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
jForce the script to consider a variable value as an array name and
not...
Hi !
Could you let me know how to force the script to consider a variable value as an array name and not as a string...
In the following script, for exemple, the script considers '_tableau' as a string, and not, as i would wish, as an array name.
<script type="text/javascript">
A_tableau=['p_perso.jpg']
tableaux_tableau=['A_tableau']
function imager(tableau)
{
_tableau=tableau
setTimeout("alert(_tableau[0])", 100)
}
imager(tableaux_tableau[0])
</script>
Thanx for your lights !
|