Solved

Trim function in Jquery

Posted on 2013-01-22
3
435 Views
Last Modified: 2013-01-23
Team,
whenever i enter space in the text box in my form , i get NAN. since space is not a number.
i would to use use jquery's inbuilt trim fucntion for my input text fields .
like as  "value = value.trim(); "

in FF it works great. however in IE8 it gives some JS unsupported object error. i tried to use jquery.validate.js & jquery.1.4.2.js . however nothing seems to be working. any clues?

Thanks
0
Comment
Question by:Easwaran Paramasivam
  • 2
3 Comments
 
LVL 5

Expert Comment

by:Php_expert
ID: 38808391
instead try this

i$.trim(value)

for more information refer this:

http://api.jquery.com/jQuery.trim/
0
 
LVL 39

Accepted Solution

by:
Pratima Pharande earned 250 total points
ID: 38808576
0
 
LVL 39

Expert Comment

by:Pratima Pharande
ID: 38808578
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is a Lightbox? A Lightbox is the effect you see when you click, for example, an image and the screen fades out and up pops the same image but in its full size dimensions. There are lots of Lightbox effects for jQuery. Problem is they are a…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question