Solved

Trim function in Jquery

Posted on 2013-01-22
3
432 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
Comment Utility
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
Comment Utility
0
 
LVL 39

Expert Comment

by:Pratima Pharande
Comment Utility
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Responsive CSS question 2 37
Python On Mouseover Save URL/Link 4 29
Hovering effect 9 28
Open a div with click on an image 7 38
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
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…

771 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

11 Experts available now in Live!

Get 1:1 Help Now