BobbyJones BobbyJones - 11 months ago 30
HTML Question

How to ignore whitespacing in input boxes

I need your help,

Normally when a user inputs data, how can the code be modified below so as to program it to ignore any whitespacing ie. "a blank keyboard space"

Here is the HTML markup in question:

<!DOCTYPE html>



<script type="text/javascript">

window.onload = function() {

$("#fileno").bind("input", function(e) {

$('#save').prop('disabled', false)






<input type="button" value="save" id="save" disabled>



Answer Source

Use the Trim function

fieldName =

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download