Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7445879
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T12:09:20+00:00 2026-05-29T12:09:20+00:00

I speak spanish, so I am using a lot the accent mark (á,é..). Whenever

  • 0

I speak spanish, so I am using a lot the accent mark (á,é..). Whenever I need to write them, I use á é and so on.

Now I have a problem because I want to compare if two sentences are different, in order to continue with my function but it doesnt work.

Here is an explanation of what I am trying to do.

There is an input which has a given value explaining to the user what he needs to write in that input. When the user clicks on the input, the given value will dissapear, so the user writes the new value. Now, I have a function which takes the new value and do some stuff with it (not relevant). I want the function to do so, only if the value is different of the value given at first, making sure that the function works only when the user has written something. My problem is that the given value has an Accent mark so when i do the comparison, it always do the rest of the function.

Here is some code to make myself clear.

<input type="text" id="proyecto" value="&Aacute;rea donde oper&oacute; el proyecto" />

<script type="text/javascript">
function proyecto(){
   var proyecto = document.getElementById("proyecto").value;
   var aux1 = "&Aacute;rea donde oper&oacute; el proyecto";
   var aux2 = "Áreas donde operó el proyecto";

   if (proyecto != aux1)
       alert("DO THE REST OF THE FUNCTION");
   if (proyecto != aux2)
       alert("DO THE REST OF THE FUNCTION");
}
</script>

I use a function that then the user clicks on the input, it clears the input putting it blank. If the user do not write anything, value will appear again.

I hope i made myself clear.

thanks a lot!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T12:09:23+00:00Added an answer on May 29, 2026 at 12:09 pm

    You can use a regular expression. Like this:

    <script type="text/javascript">
    function proyecto(){
       var proyecto = document.getElementById("proyecto").value;
       var aux = /[AÁ]reas donde oper[oó] el proyecto/i;
       if (!aux.test(proyecto))
           alert("DO THE REST OF THE FUNCTION");
    }
    </script>
    

    See: http://www.w3schools.com/jsref/jsref_obj_regexp.asp

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a number of small REAL Studio apps that use the Speak keyword
I'm administrating a informix IDS DBMS in Argentina. We speak spanish, and the traditional
In pseudo speak: I use a command: edit! http://apath/toapage.pg1.html and with the elinks plugin
I am using google translator I do not speak English, I hope you understand.
I need my users to be able to state the langue(s) they speak, so
Hello for all people... Sorry for my english, but speak spanish... In this week,
I am trying to use the addObjectsFromArray to concatenate (so to speak) two arrays
A lot of articles online on role based access speak of applying something like
I'm using rJava to speak to the Amazon Web Services Java API from inside
I will let the example speak for it self: ruby-1.9.2-p0 > DateTime.now => Mon,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.