Link to home
Start Free TrialLog in
Avatar of newbie27
newbie27Flag for United Kingdom of Great Britain and Northern Ireland

asked on

javascript escape function

Hello Experts,
I am generating dynamic text areas on the page, capturing its data and assigning to the variable before being posted. The problem is for all the spaces in the data it is converting it to "%20" , al though I am using escape function but still not doing it right. Can someone please advice?

something like this

sItemdNotes += "," + escape($("#editedData"+currId).html());

sItemdNotes= test%20notes,hello%20how%20are%20you   --> this is how it is doing it at the moment

Thanks
Sam
Avatar of vibrazy
vibrazy
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi

Try sItemdNotes += "," + escape($("#editedData"+currId).val());

Regards,
Vibrazy
Avatar of HonorGod
The statement should be:
sItemdNotes= 'test%20notes,hello%20how%20are%20you'

Open in new window

Ah, I see. ssorry.  I think vibrazy is right
Avatar of newbie27

ASKER

Hello Guys,
Thanks for your comments, apparently I dont think I can use val() as I am capturing the data from the html

It is not returning anything if I use val().

please can you visit my app here

http://213.253.134.6/artism/admin/list_admin.asp#testAll

if you notice in the grid, i have a notes link, upon clicking it you will get a dialog( jquery facebox plugin) to accept data and once you add text please click on the right close button to see the text getting appended to the html Id, it is doing it fine, but when you want to save this by selecting the row and giving a unique listname, click on save.

i am currently showing it as an alert ... please have a look.

ASKER CERTIFIED SOLUTION
Avatar of vibrazy
vibrazy
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks, this has worked !
Im glad to help.

Regards,
Vibrazy