Solved

Problems with äöü in JQUERY

Posted on 2012-03-27
2
286 Views
Last Modified: 2012-03-28
Hi Experts

The following code ist haow to set focus on a input (text) an set cursor psition behind the text.

	$('input[name=test]').focus();
	var text_val = $('input[name=test]').val();
	$('input[name=test]').val('');
	$('input[name=test]').val(text_val);

Open in new window


It works very well (in firefox) ...

two problems

1. after input a german sign like (äöü) the value of the input like (¿)
2. in ie it doesn't work

inputflied is defined first, jquery at the end of my site ..
i have tested by loading (css and js) with utf-8 and iso-8859-1

metatags are ...

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Type" content="application/x-javascript; charset=UTF-8" />

also testet with iso-8859-1

i hope anyone can help

thanx

talki
0
Comment
Question by:Talki
2 Comments
 
LVL 11

Accepted Solution

by:
un1x86 earned 500 total points
ID: 37775573
set the following content type
contentType: "application/x-www-form-urlencoded; charset=UTF-8"
0
 

Author Comment

by:Talki
ID: 37775828
thank you for youre answer

i have already solved this problem ...
you ar on the right way ;-)

the input with the name test is loaded by .load()  with a php-script ...

i have to set the header at top of this script ...

	header('Content-Type: text/html; charset=ISO-8859-1');

Open in new window


now is works very well ...

thanx

talki
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question