delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
abstract:

2. Most puzzling is when I do view source on browswer in both cases code look identical.  like
if (document.formDetails.first_name.value=="" || document.formDetails.first_name.value=="*Prénom") {
errmessage = errmessage + " -prénom";
}
Javascript runs on client side, so it shoud not matter even if code look like Pr\303\251nom   at  the sever. SO I don't understand why code does not work in case 2. Infact if I do view souce at save it, and open in the browswer it works, but just does not work on the website.


I have  javascript code like the following. I am using Apache/UNIX
CASE 1
Code:
  1. if (document.formDetails.first_name.value=="" || document.formDetails.first_name.value=="*Prénom") {
  2. errmessage = errmessage + " -prénom";
  3. }
Copy Code
when this file go to one of the unix box it look like the following
Code:
  1. if (document.formDetails.first_name.value=="" || document.formDetails.first_name.value=="*Prénom") {
  2. errmessage = errmessage + " -prénom";
  3. }
Copy Code
my if statement work fine here
CASS 2.
when same code goes to the other unix box and I look at it looks like
Code:
  1. if (document.formDetails.first_name.value=="" || document.formDetails.first_name.value=="*Pr\303\251nom") {
  2. errmessage = errmessage + " -pr\303\251nom";
Copy Code
On this box my if statement does not work even if the condition is met.
My questions are
1. Why the character turn into numbers, is it something to do with UNIX setting etc?
2. Most puzzling is when I do view source on browswer in both cases code look identical.  like
if (document.formDetails.first_name.value=="" || document.formDetails.first_name.value=="*Prénom") {
errmessage = errmessage + " -prénom";
}
Javascript runs on client side, so it shoud not matter even if code look like Pr\303\251nom   at  the sever. SO I don't understand why code does not work in case 2. Infact if I do view souce at save it, and open in the browswer it works, but just does not work on the website.

TOP

It depends on which charset your documents use. Make sure it is UTF-8, both on client and server side, to avoid any problems.
http://www.w3.org/International/O-HTTP-charset



2. Most puzzling is when I do view source on browswer in both cases code look identical.  like
if (document.formDetails.first_name.value=="" || document.formDetails.first_name.value=="*Prénom") {
errmessage = errmessage + " -prénom";
}
Javascript runs on client side, so it shoud not matter even if code look like Pr\303\251nom   at  the sever. SO I don't understand why code does not work in case 2. Infact if I do view souce at save it, and open in the browswer it works, but just does not work on the website.

TOP

Back Forum