Results 1 to 7 of 7

Thread: Char to String, jScript

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Char to String, jScript

    I know this is a really lame question but I have no idea how to do this with Javascript\ASP.

    I have a number, lets say 72.
    How do I convert that into a STRING. Not "72" but "H"

    72 = H (i think)

    Any help? I looked for several answers on the web but its 3am and im quite tired. ZZZzzzz..........
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  2. #2
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727
    whats the connection between the number 72 and the letter h?

  3. #3
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by davebat
    whats the connection between the number 72 and the letter h?
    ASCII?
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  4. #4
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    Code:
    String.fromCharCode(72) // result "H"
    String.fromCharCode(97, 98, 99) // result "abc"

  5. #5
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    In VB/ASP

    VB Code:
    1. response.write Chr(72) 'output H
    2.  
    3. response.write Asc("H") 'output 72
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  6. #6

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547
    Yes I'm sorry it was really late at night when I posted this.
    The connection is ASCII number to a string. I believe H is 72 in ASCII, or at least something around that.

    Also, keep in mind I'm using Javascript\ASP not VBScript\ASP

    I'm not actuall home to test out the .fromCharCode function but I'm sure it will work.

    Thanks a lot guys!
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

  7. #7
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by invitro

    Also, keep in mind I'm using Javascript\ASP not VBScript\ASP

    I'm not actuall home to test out the .fromCharCode function but I'm sure it will work.

    Thanks a lot guys!
    It works fine.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width