A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Taking out the " in a variable????

  1. #1
    Senior Member
    Join Date
    Oct 2000
    Posts
    302
    hello,

    I need to replace the " in Var1

    Ex: Var1 = "Lets "see" if this will work"

    I need to make it: Var1 = "Lets see if this will work"

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    technically you cant say
    Var1 = "Lets "see" if this will work"

    you'e ending the string with the second quotes making for a syntax error. If you want quotes in strings you'll need to escape them with a backslash

    Var1 = "Lets \"see\" if this will work"

    if you want to get rid of them at that point then you can use

    Var1 = Var1.split("\"").join("")

  3. #3
    Senior Member
    Join Date
    Oct 2000
    Posts
    302
    Thanks for your reply!!

    Var1 is a text field, so the user will be typing in Lets "see" if this will work at that piont the user will be pressing submit and that is the point where I would like to take out the "see" to see

    Thanks,

    Aaron

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

HTML5 Development Center