How to show java script alert of arabic characters/text from ltr(Left to right) format.In html we have ltr tag.
A:
Here's a thread on SO that details using jQuery to reverse a string. If you already have the text in the arabic characters, you'd just need to reverse it.
http://stackoverflow.com/questions/1611427/reversing-a-string-in-jquery
Joel Etherton
2010-01-29 15:13:25
Not good enough. Punctuation would be incorrect.
Josh Stodola
2010-01-29 15:41:40
@Josh: can you provide a reference for that? I've been trying to look it up, but can't find any information regarding what you say, and I'd like to read up on it.
Joel Etherton
2010-01-29 16:06:42
Josh Stodola
2010-01-29 16:17:07
@Josh: Yah, tried that. Couldn't find anything specific to what you were saying. Being an ass isn't necessary.
Joel Etherton
2010-01-29 16:20:37
A:
You can't do it using the regular javascript alert()
however, you can use some custom javascript alert box (you can use HTML inside it)
some like this http://slayeroffice.com/code/custom_alert/ or http://jdstiles.com/java/jsalert.html
Aziz
2010-01-29 15:31:20
+1
A:
This is largely operating system dependent. Simply reversing the string is not 100% correct, since this does not render punctuation correctly.
If you need 100% locale independence in the browser, I would suggest using an HTML dialog, like jQuery UI, instead of alert().
spoulson
2010-01-29 15:39:21