javascript - toString method in jquery? or something similar -


answer found!

i'm reading xml document , sending function

$(data).find('colleges').attr('next') 

that returns discipline , javascript thinking it's variable, can how attribute in tag , have return string 'discipline'

is there tostring()-type method add onto selection?

$(data).find('colleges').attr('next').tostring() 

the issue having sending function

createselect( $(data).find('colleges').attr('next') ) 

but firebug giving me error saying value, discipline, undefined? why javascript reading discipline var , not string?

if this...

$(data).find('colleges') 

...doesn't find matches ( <colleges>...</colleges> ), this...

.attr('next') 

...will return undefined.

the first thing should test see if .find() found anything.

alert( $(data).find('colleges').length ); 

if alert gives 0, there no matches, , you'll have inspect data see if contains expect.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -