Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

JavaScript Forum


You are currently viewing our JavaScript Forum as a guest. Please register to participate.
Login



Reply
Special Characters in textarea
Old 05-18-2011, 08:11 AM Special Characters in textarea
Skilled Talker

Posts: 83
Trades: 0
Hello,

I want to display special characters via Javascript in a Textarea (like French characters, é, è, à .....).

If i type the directly in the javascript code, i get some weird simbols in my textarea. If i type them as HTML code (&eacute, then dat code is displayed instead of the character it represents.

Any idea how to proceed?

Many thanks!

Matt
killerwhale65 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 05-18-2011, 08:23 AM Re: Special Characters in textarea
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
probably depends on how your script is putting the code into the text area.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-18-2011, 08:53 AM Re: Special Characters in textarea
Skilled Talker

Posts: 83
Trades: 0
Hello, like this:

HTML Code:
tekst[1] = "\Nous avons bien reçu votre paiement, pour lequels nous vous remercions.\n\nVotre commande va &ecirc;tre pr&eacute;par&eacute;e et nous vous aviserons de l'exp&eacute;dition de votre colis.\n\nSi vous avez encore des questions &agrave; ce sujet, n'h&eacute;sitez pas &agrave; les poser via notre adresse : info@minitair.be\n\nAvec nos salutations les meilleures,\n\nMatthias Thoen\nMinitair";

document.status.comments.value = tekst[1];
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Old 05-18-2011, 09:00 AM Re: Special Characters in textarea
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,383
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
A textarea does not have a value attribute, you need to use the innerHTML property.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 05-18-2011, 09:51 AM Re: Special Characters in textarea
Skilled Talker

Posts: 83
Trades: 0
wonderfull, thanks!
killerwhale65 is offline
Reply With Quote
View Public Profile
 
Old 05-26-2011, 06:35 AM Re: Special Characters in textarea
Average Talker

Posts: 18
Trades: 0
you need to add blackslah before the special charters that you need to display in the java script.

ex :

var txt="We are the so-called \"Vikings\" from the north.";
document.write(txt);
techforums123 is offline
Reply With Quote
View Public Profile Visit techforums123's homepage!
 
Reply     « Reply to Special Characters in textarea
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.54269 seconds with 12 queries