Developer Function: Script: $p.set
## Overview
This explains the method that allows you to change the value on the screen and store it in $p.data at the same time. If you change the value of a text box or other item in a script, the value will not be updated even if you change it like this: $('#Results_ClassA').val('changed value'); This is because only the value changed by the user is stored in the client-side variable "$p.data" of Pleasanter, and is posted.
## Syntax
##### Javascript
```
$p.set($('ID name of the form you want to change'), 'Changed value')
```
## Usage Example
If you set the following sample code to the Pleasanter script, when you click the "Update" button on the edit screen, the title item will be updated with the "[Title](/en/manual/tenant-logo)" value set.
##### Javascript
```
$p.events.before_send_Update = function () {
$p.set($p.getControl('Title'), 'title')
}
```