tags:

views:

127

answers:

3

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
Not good enough. Punctuation would be incorrect.
Josh Stodola
@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
Josh Stodola
@Josh: Yah, tried that. Couldn't find anything specific to what you were saying. Being an ass isn't necessary.
Joel Etherton
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
+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