Solved

Trim function in Jquery

Posted on 2013-01-22
3
433 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Introduction JSON is an acronym for JavaScript Object Notation.  It is a text-string data transport mechanism, capable of representing simple or complex data structures in a consistent and easy-to-read manner.  Similar in concept to XML, but more e…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

919 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now