Jump to content

problem using javascript in mozilla addon

- - - - -

  • Please log in to reply
No replies to this topic

#1
exilonX

exilonX

    Newbie

  • Members
  • Pip
  • 1 posts
Hi guys ,
this is my first post !
I want to write in a panel( a html page) some words( 3 words per second) at a specific interval of time and it works if I do i with a variable defined and initialised with a text in the javascript but if I use

var str1="";

self.on('message', function (sent){

  str1=sent;

});

then str1 the string which I want to write in the html page 3 words at a time is empty, meaning that the string str1 defined globally is not changed in self.on and I can't understand why... please help :D




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users