Question: I am trying to install thrift servr on my Mac OS X.

I have download thrift 0.10.0, then have used the configure command. Its output is as below :

```
thrift 0.10.0

Building Plugin Support ...... : no
Building C++ Library ......... : no
Building C (GLib) Library .... : no
Building Java Library ........ : no
Building C# Library .......... : no
Building Python Library ...... : yes
Building Ruby Library ........ : no
Building Haxe Library ........ : no
Building Haskell Library ..... : no
Building Perl Library ........ : yes
Building PHP Library ......... : yes

```

I then used the `make` command. 

Now when i run :`sudo make install`. 
Its giving me the error as below.

```
error: could not create '/usr/lib/python3.5': Operation not permitted

```

Answer: 
**There was many problems:**

1. change `value` to `val`
2. use another name for submit function, it's kinda reserved
3. use `this` instead of `$('#PasswordChange form')`
4. use `var first_pass = $('.first_try');` instead of `find`
5. you forgot to write `else`
6. and you need use `event.preventDefault();` to stop refreshing page or submiting page.

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script>
function save(form) {
        var first_pass = form.querySelector('.first_try');
        var second_pass = form.querySelector('.second_try');
        if (first_pass.value == second_pass.value) {
            alert('its ok');
            return true;
        } else {
        first_pass.value = '';
        second_pass.value = '';
        first_pass.placeholder = 'Пароли не совпадают';
        first_pass.style.borderColor='red'; 
        second_pass.style.borderColor='red'; 

        return false
    }
    }
</script>
<form role="form" method="post" onsubmit="event.preventDefault(); return save(this)">
    <h3>Редактирование пользователя</h3>
    <div class="form-group">
        <input type="password" class="form-control first_try" name="password"
               placeholder="Новый пароль"
               required>
    </div>
    <div class="form-group">
        <input type="password" class="form-control second_try" name="password"
               placeholder="Повтор пароля"
               required>
    </div>

    <input type="submit" name="submit" class="btn btn-primary pull-right" value="Отправить"/>

</form>
```
Use this code 

```html
<!DOCTYPE html>
<html>

<head>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script type="text/javascript">
    function submitData(form) {
      var first_pass = form.find('.first_try');
      var second_pass = form.find('.second_try');
      if (first_pass.value == second_pass.value) {
        return true
      }
      first_pass.value = '';
      second_pass.value = '';
      first_pass.attr('placeholder', 'Пароли не совпадают');
      first_pass.css('border-color', 'red');
      second_pass.css('border-color', 'red');
      return false
    }
  </script>
</head>

<body>
  <form role="form" method="post" onsubmit="return submitData($('#PasswordChange form'))">
    <h3>Редактирование пользователя</h3>
    <div class="form-group"> <input type="password" class="form-control first_try" name="password" placeholder="Новый пароль" required></div>
    <div class="form-group"> <input type="password" class="form-control second_try" name="password" placeholder="Повтор пароля" required></div><input type="submit" name="submit" class="btn btn-primary pull-right" value="Отправить"></form>
</body>

</html>
```