added oninput for text field handling

pull/1039/head
Pliable Pixels 2015-08-26 11:22:09 -04:00
parent 02a6443c3b
commit 08d177185c
1 changed files with 4 additions and 3 deletions

View File

@ -26,7 +26,6 @@ if ( !canEdit( 'System' ) )
$running = daemonCheck(); $running = daemonCheck();
$states = dbFetchAll( "select * from States" ); $states = dbFetchAll( "select * from States" );
$focusWindow = true; $focusWindow = true;
xhtmlHeaders(__FILE__, translate('RunState') ); xhtmlHeaders(__FILE__, translate('RunState') );
@ -76,14 +75,16 @@ if ( empty($_REQUEST['apply']) )
<tbody> <tbody>
<tr> <tr>
<th scope="row"><?php echo translate('NewState') ?></th> <th scope="row"><?php echo translate('NewState') ?></th>
<td><input type="text" name="newState" value="" size="16" onchange="checkState( this );"/></td> <!-- PP - added oninput so that changes are detected immediately -->
<!-- PP - retained onchange for older browsers -->
<td><input type="text" name="newState" value="" size="16" oninput="checkState( this );" onchange="checkState(this);"/></td>
</tr> </tr>
</tbody> </tbody>
</table> </table>
<div id="contentButtons"> <div id="contentButtons">
<input type="submit" value="<?php echo translate('Apply') ?>"/> <input type="submit" value="<?php echo translate('Apply') ?>"/>
<input type="button" name="saveBtn" value="<?php echo translate('Save') ?>" disabled="disabled" onclick="saveState( this );"/> <input type="button" name="saveBtn" value="<?php echo translate('Save') ?>" disabled="disabled" onclick="saveState( this );"/>
<input type="button" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled" onclick="deleteState( this );"/> <input type="button" name="deleteBtn" value="<?php echo translate('Delete') ?>" disabled="disabled" onclick="deleteState( this );"/>
<input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/> <input type="button" value="<?php echo translate('Cancel') ?>" onclick="closeWindow()"/>
</div> </div>
<?php <?php