I have posted this msg before, but didnt get any answer...
Please, i'm still waiting for an answer to this, and i need the answer quickly if you know it, please, it's the only thing left in my application...
Here's my message again:
Hi everybody!
i need to have a string repeated using a java script.. let's say i have this:
[code]
var txt = "a text "
var msg
msg = txt.repeat(2)
alert(msg)
[/code]
and i would like the output to be "a text a text", what method do i need to use in place of the repeat method? or what is the way to achieve this?
thank you very much!
Comments
: I have posted this msg before, but didnt get any answer...
: Please, i'm still waiting for an answer to this, and i need the answer quickly if you know it, please, it's the only thing left in my application...
: Here's my message again:
:
: Hi everybody!
: i need to have a string repeated using a java script.. let's say i have this:
:
: [code]
: var txt = "a text "
: var msg
:
: msg = txt.repeat(2)
: alert(msg)
: [/code]
:
: and i would like the output to be "a text a text", what method do i need to use in place of the repeat method? or what is the way to achieve this?
:
: thank you very much!
:
:
[code]
msg = txt + txt;
[/code]
;-)
You can also create your own function if you do not know how often the text should be copied during design time.
[code]
[/code]
: I have posted this msg before, but didnt get any answer...
: Please, i'm still waiting for an answer to this, and i need the answer quickly if you know it, please, it's the only thing left in my application...
: Here's my message again:
:
: Hi everybody!
: i need to have a string repeated using a java script.. let's say i have this:
:
: [code]
: var txt = "a text "
: var msg
:
: msg = txt.repeat(2)
: alert(msg)
: [/code]
:
: and i would like the output to be "a text a text", what method do i need to use in place of the repeat method? or what is the way to achieve this?
:
: thank you very much!
:
:
;-)
-mac-
mailto:programmersheaven@mac-doggie.nl
the Netherlands...