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
Post a Comment