PDA

View Full Version : Getting problem with IE



shaik.yasinbasha
15 Oct 2009, 11:26 PM
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.
http://www.extjs.com/forum/images/buttons/quote.gif (http://www.extjs.com/forum/newreply.php?do=newreply&p=396573)

aconran
16 Oct 2009, 4:02 AM
Erm, what are you doing?

Are you trying to build a JSON string and then later evaluate it?

shaik.yasinbasha
28 Oct 2009, 12:57 AM
yes, i am saving data and then later evaluating it, but as my requirement i don't want enter key word so that i used this code to replace enter key with space, this code working fine in Firefox but in IE it is not.

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