Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
174
rated 0 times [  181] [ 7]  / answers: 1 / hits: 16860  / 15 Years ago, thu, june 11, 2009, 12:00:00

I am using jQuery autocomplete pluggin .



I have the following code



$().ready(function() {

function findValueCallback(event, data, formatted) {
$(<li>).html( !data ? No match! : Selected: + formatted)
.appendTo(#result);
}

});


I am trying to split the value coming in data.When i alert it,It is showing properly.But i cant use a split method to extract some data from it .(the data is ASP.ASPItems.23 , I want to take that 23 from it



When i use split,I am getting an error like split is undefined



My split code



var subjectId=data.split(.)[2]


CAn any one advice how to go ahead


More From » jquery

 Answers
7

Well seeing as split is a method defined on a string, have you considered trying data.toString().split(.) or String(data).split(.) ?


[#99339] Saturday, June 6, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ellisw

Total Points: 625
Total Questions: 92
Total Answers: 88

Location: Kazakhstan
Member since Mon, Sep 26, 2022
2 Years ago
ellisw questions
Mon, Aug 23, 21, 00:00, 3 Years ago
Fri, Nov 20, 20, 00:00, 4 Years ago
Sat, Jun 20, 20, 00:00, 4 Years ago
Tue, Apr 21, 20, 00:00, 4 Years ago
;