mIRC Home    About    Download    Register    News    Help

Print Thread
Problem with Javascript #152403 30/06/06 09:51 AM
Joined: Nov 2003
Posts: 157
RuFy Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Nov 2003
Posts: 157
Hi, I have made a code in Javascript but cause me some problem.
I can't evaluate the +time and the +frase parameters. shocked
Here is the code.
Code:
function scriviwin(time, frase) {
this.document.body.innerHTML=this.document.body.innerHTML+'<font face="tahoma" size="2"><b><span style="color:#808080;background-color: #FFFFFF">[</b><span style="color:#00FC00;background-color: #FFFFFF"> ",+time," <b><span style="color:#808080;background-color: #FFFFFF">]</b><span style="color:#000000;background-color: #FFFFFF"></b></span></span></span></span> ",+frase," <br>';
window.scrollBy(0,999999999);
}

I use this: scriviwin(' $time Some text bla bla bla... ')

Re: Problem with Javascript #152404 30/06/06 01:50 PM
Joined: Oct 2005
Posts: 1,741
G
genius_at_work Offline
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
That is very nice code, but why are you showing it to us here on this mIRC forum?

-genius_at_work

Re: Problem with Javascript #152405 30/06/06 04:33 PM
Joined: Nov 2003
Posts: 157
RuFy Offline OP
Vogon poet
OP Offline
Vogon poet
Joined: Nov 2003
Posts: 157
Because I'm working on a mIRC Addon that use HTML page instead normal mIRC window.

Re: Problem with Javascript #152406 01/07/06 10:28 AM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
this.document.body.innerHTML=this.document.body.innerHTML+'<font face="tahoma" size="2"><b><span style="color:#808080;background-color: #FFFFFF">[</b><span style="color:#00FC00;background-color: #FFFFFF">'+time+'<b><span style="color:#808080;background-color: #FFFFFF">]</b><span style="color:#000000;background-color: #FFFFFF"></b></span></span></span></span>'+frase+'<br>';

it's: 'literal string'+variable+'literal string'+variable etc etc smile


$maybe