Solved

Problems with äöü in JQUERY

Posted on 2012-03-27
2
283 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

jQuery is a JavaScript library that greatly simplifies JavaScript programming. AJAX is an acronym formed from "Asynchronous JavaScript and XML."  AJAX refers to any communication between client and server, when the human client does not observe a…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now