Thanks for the reply Joe. Sorry I solved this problem last week.
P-
On Dec 14, 2008, at 9:40 PM, Joe [at] subprint.com wrote:
>
> To answer your question I need to know the context of where you are
> trying to grab this value. Is it within an anonymous function?
> Within the infamous $().ready() method?
>
> Moreover, this:
>
> var song_val = jQuery("#playlist_songs_"+editRowID+"_song").val();
>
> is perfectly valid syntax in jQuery. So your problem is not there.
>
> However, your problem sounds closure related so show so more code or
> post a link and I'll help you out.
>
> Cheers.
>
> Joe
>
> www.subprint.com
>
> Senior UI/UX Engineer & jQuery Evangelist
> BearingPoint
>
> On Dec 11, 12:44 pm, "ariel comstock" <[email protected]>
> wrote:
>> You might also try converting the row ID to a string and then
>> concatenating it. JQuery might need for the variables to all be of
>> the same type before stringin' 'em together.
>>
>> Hth
>>
>> ariel ~
>>
>> On 12/10/08, Sherri Fleming <[email protected]> wrote:
>>
>>
>>
>>
>>
>>> What is the order of the functions in document.ready? Is editRowID
>>> being set
>>> before this var? You might also try adding the html element like
>>> this:
>>
>>> var song_val = jQuery("input#playlist_songs_"+editRowID
>>> +"_song").val();
>>
>>> Sometimes the html element makes a difference for me but I have not
>>> determined why as it is not always the case. I'd also do an
>>> alert(editRowID); just before the var to see if it has anything at
>>> that
>>> point.
>>
>>> If you are still stuck, send me the javascript file and I'll look
>>> at it.
>>
>>> Sherri
>>
>>> -----Original Message-----
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of Paul
>>> Sent: Wednesday, December 10, 2008 7:07 PM
>>> To: Refresh Austin
>>> Subject: [Refresh Austin: 3385] Help with js/jquery
>>
>>> ...
>>
>>> var song_val = jQuery("#playlist_songs_16_song").val();
>>
>>> But for some reason I cannot do the same with a variable. Here
>>> editRowID is equal to '16' and is just a var set from another
>>> function.
>>
>>> var song_val = jQuery("#playlist_songs_"+editRowID
>>> +"_song").val();
>>
>>> In this second instance song_val is set to undefined. What am I
>>> missing?
>>
>>> Paul
>>
>> --
>> Sent from Gmail for mobile | mobile.google.com
>>
>> ariel ~
>
> >
--~--~---------~--~----~------------~-------~--~----~
Our Web site: http://www.RefreshAustin.org/
You received this message because you are subscribed to the Google Groups
"Refresh Austin" group.
[ Posting ]
To post to this group, send email to [email protected]
Job-related postings should follow
http://groups.google.com/group/Refresh-Austin/web/refresh-austins-job-posting-guidelines.
We do not accept job posts from recruiters.
[ Unsubscribe ]
To unsubscribe from this group, send email to
[email protected]
[ More Info ]
For more options, visit this group at
http://groups.google.com/group/Refresh-Austin
-~----------~----~----~----~------~----~------~--~---