Results 1 to 10 of 10

Thread: Problem in IE

  1. #1
    Ext User
    Join Date
    Oct 2009
    Posts
    20
    Vote Rating
    0
      0  

    Question Problem in IE

    I have small window, in that I have one Textarea field and OK button for saving that data,
    now when i am typing something in textarea by pressing "Enter" key i will go to next line after i will type something(now entier data in two lines). In textarea value i am retriving by getvalue from json data and i am converting \n by using this code in Firefox it is working means saving but in IE it is not saving and showing error "unterminated string constant "

    please check the code

    jsonData1 = jsonData1.substring(0, jsonData1.length-1);

    jsonData1 = jsonData1.replace(/\n/g,'');

    jsonData1="{"+jsonData1+"}";


    Please give some suggestions for resolving this issues

    Thanks.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    1. This is not a bug in Ext, so I'm going to move this to the Help section.
    2. The fragment you posted can't generate an 'unterminated string constant' error. Post all your code for getting and saving the textarea value.

  3. #3
    Ext User
    Join Date
    Oct 2009
    Posts
    20
    Vote Rating
    0
      0  

    Default

    give me replay dude...

  4. #4
    Ext User
    Join Date
    Oct 2009
    Posts
    20
    Vote Rating
    0
      0  

    Wink

    plz this is urgent

  5. #5
    Ext User
    Join Date
    Oct 2009
    Posts
    20
    Vote Rating
    0
      0  

    Default

    plz give some suggetion

  6. #6
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    Did you actually read my reply?

    The fragment you posted can't generate an 'unterminated string constant' error.
    Post all your code for getting and saving the textarea value.

  7. #7

  8. #8
    Ext User
    Join Date
    Oct 2009
    Posts
    20
    Vote Rating
    0
      0  

    Default

    Thanks for giving response.

    Major problem is I want to replace Enter ASCI character with space,

    Where in mozilla i am getting Enter ASCI character as "\n" here i am replacing "\n" with space,

    But in IE Enter ASCI character is not getting as "\n", so i cant able to replace Enter ASCI character.

    Will you please give me the details bout the ASCI character for "Enter " in IE ?

    If i can able to replace Enter Character my problem will solves.

  9. #9
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    119
      0  

    Default

    That is because in IE an enter is a CR+LF, but in other browsers it's only a LF.

    You should use:
    Code:
    jsonData1 = jsonData1.replace(/\r?\n/g, ' ');
    (but what does this have to do with an 'unterminated string constant'?)

  10. #10
    Ext User
    Join Date
    Oct 2009
    Posts
    20
    Vote Rating
    0
      0  

    Default

    OOOOOOh its working.

    My problem was solved

    Thanks lot ,

Posting Permissions

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