We help IT Professionals succeed at work.

javascript escape function

newbie27
newbie27 asked
on
3,502 Views
Last Modified: 2010-04-21
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
Comment
Watch Question

Commented:
Hi

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

Regards,
Vibrazy
HonorGodSoftware Engineer
CERTIFIED EXPERT

Commented:
The statement should be:
sItemdNotes= 'test%20notes,hello%20how%20are%20you'

Open in new window

HonorGodSoftware Engineer
CERTIFIED EXPERT

Commented:
Ah, I see. ssorry.  I think vibrazy is right

Author

Commented:
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.

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
thanks, this has worked !

Commented:
Im glad to help.

Regards,
Vibrazy
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.