Page 1 of 1

Variable location...

Posted: Thu Jun 16, 2005 8:16 pm
by Sacapuss
Hi !

I worked yet on this problem, and i wonder another time :

Why cant i have this script work (how could i have it work) ?

Code: Select all

index=0
message='Bienvenue'

function frapper()
{
Emplacement=message.slice(0, index)
if(index++<message.length)
setTimeout('frapper()', 100)
}

Emplacement=document.title
frapper()
The idea, of course, is that 'Emplacement' is variable (ie can have as value 'status' or 'x.innerHTML' etc.)

NB: i found a solution that works :

Code: Select all

eval(instructions_array&#1111;instruction_no]
for line 6.
I'd like to find a more elegant one.

Do you have an idea ?

Thanx for the help !