Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 09-10-2012, 07:51 PM   PM User | #1
itzzmeyoyo
New to the CF scene

 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
itzzmeyoyo is an unknown quantity at this point
Unicode to Arabic

Hi All,

I have a searcher in my form , on click of searcher, it displays a popup window with a list of cities in arabic language. the functionality is when i click on any of the city in the list the value should be populated in the text field in the parent window and the pop up window should get closed. I am using window.returnValue for returning the chosen value

Issue : the value returned to the parent window from the pop up window has been changed to unicode . its like
"%U0672%U0679%U0674". its not populating the arabic literal.

Kindly let me know either how to convert this unicode in to arabic or let me know how to return the value in arabic instead of unicode from the pop up window to parent window

Thanks in advance.
itzzmeyoyo is offline   Reply With Quote
Old 09-11-2012, 08:15 PM   PM User | #2
itzzmeyoyo
New to the CF scene

 
Join Date: Sep 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
itzzmeyoyo is an unknown quantity at this point
Hi All,

got the solution, the below code works for me.

var cityAr = document.forms[0].citySearch.value;
var city_ar = cityAr.replace(/%/g,'\\');
eval("document.forms[0].citySearch.value=\""+city_ar+"\"");
itzzmeyoyo is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:33 AM.


Advertisement
Log in to turn off these ads.