Question: My goal is to use a [Greasemonkey-style user script](http://www.chromium.org/developers/design-documents/user-scripts) in Google Chrome to enable remembering of passwords on a specific form that has the `autocomplete="off"` attribute set.

Chrome's developer tools indicate that `autocomplete="on"` is being successfully set by the script, but this does not have the expected effect of allowing the storage of passwords on the form.

Why doesn't this work?

---

Example
-------

Chrome offers to remember passwords entered on this test page (Expected):

```
<html><body><form action="">
    <input type="text" name="username" />
    <input type="password" name="password" />
    <input type="submit" name="submit" value="Log In" />
</form></body></html>

```

Chrome does not offer to remember passwords entered on this test page (Expected):

```
<html><body><form action="">
    <input type="text" name="username" />
    <input type="password" name="password" autocomplete="off" />
    <input type="submit" name="submit" value="Log In" />
</form></body></html>

```

Chrome's *Inspect Element* tool reveals a successful modification of the above test page by the user script (Expected):

```
<html><head></head><body><form action="" autocomplete="on">
    <input type="text" name="username" autocomplete="on">
    <input type="password" name="password" autocomplete="on">
    <input type="submit" name="submit" value="Log In">
</form></body></html>

```

Chrome still does not offer to remember passwords after this modification (Unexpected).

Answer: 
One of my favorite jQuery form validation plugins has to be [Happy.js](http://happyjs.com/). It's very lightweight and extensible, and requires very little effort to get working.
The standard way to validate with jQuery is to just use the [jQuery validation plugin](http://docs.jquery.com/Plugins/validation). It's widely used, regularly maintained, easy to use and mature. There's no point in rewriting something that's already been done. You can obviously use this plugin to control form submission.