Variable location...

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Sacapuss
Forum Commoner
Posts: 40
Joined: Mon May 16, 2005 9:46 pm
Location: Earth...

Variable location...

Post 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 !
Post Reply