471,896 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,896 software developers and data experts.

how to convert integer to string in javascript

i have number that i need to concatenate with string
Jul 23 '05 #1
7 46501
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."


this does not work with firefox(mozilla)
Jul 23 '05 #3
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."


this does not work with firefox(mozilla)


I don't believe it. It is basic javascript.

Could you try to debug with 6 dwarfs perhaps?
--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #4
TomislaW wrote:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."

this does not work with firefox(mozilla)


MyNum.toString(10)+MyString

(10 is decimal, 16 would be hexadecimal)
Jul 23 '05 #5
Lee
TomislaW said:

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."


this does not work with firefox(mozilla)


Sure it does. Show us exactly what "does not work".

Jul 23 '05 #6
TomislaW wrote:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:
i have number that i need to concatenate with string


result = 7 + " dwarfs of Snowwhite."

this does not work with firefox(mozilla)


It should. Please show exactly what you are doing that doesn't work.
---
John W. Kennedy
"I want everybody to be smart. As smart as they can be. A world of
ignorant people is too dangerous to live in."
-- Garson Kanin. "Born Yesterday"
Jul 23 '05 #7
Lee wrote:
TomislaW said:
"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.29...
TomislaW wrote on 24 mrt 2005 in comp.lang.javascript:

i have number that i need to concatenate with string

result = 7 + " dwarfs of Snowwhite."


this does not work with firefox(mozilla)

Sure it does. Show us exactly what "does not work".


num="Zero,One,Two,Three,Four,Five,Six,Seven".split (",")

function fplural(word){return word.substring(0,word.length-1)+"ves"}
result=num[7]+" "+ fplural("dwarf")+" of Snow White";
document.write(result);

Mick
Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by IamZadok | last post: by
9 posts views Thread by mprocopio | last post: by
3 posts views Thread by Convert TextBox.Text to Int32 Problem | last post: by
5 posts views Thread by Mika M | last post: by
14 posts views Thread by Drew | last post: by
20 posts views Thread by Niyazi | last post: by
3 posts views Thread by Lonifasiko | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.