So far reading all your post today points to one thing in common. You don't really distinguish between types of objects (ie array, string, objects etc) https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference
Go there and learn about objects first. Hope it helps. On Jan 13, 5:04 pm, sam <sam.from.hackern...@gmail.com> wrote: > I didn't read your whole post. > > However, you should read the docs to be sure functions are returning > what you think they are returning. > > <jQuery>.attr("one param") will return a String of that attribute... > so you cannot then call ".val()" because .val() is not a method that > String has. > > <jQuery>.val() should work just fine for form inputs. > > <jQuery>.next(<selector>) returns the next SIBLING elements to each > <jQuery>. If you're looking for elements inside <jQuery> then > use .find(). > > Hope this helps. > > -sam > > On Jan 13, 7:29 pm, "Rick Faircloth" <r...@whitestonemedia.com> wrote: > > > Starting from the input with the class "update-button" > > in the next to the bottom line of the HTML/CFML below, > > I'm trying to traverse one line up to the input with two > > classes, the second being the important one, "update-input". > > > I've tried using: > > $('.update-button).parent().next('.update-input').attr('value').val() > > to get the form field input placed into the field by the user. In other > > words, > > I'm trying to get the value the user puts into the field, which is the tour > > url. > > > The next value I need to send via ajax is top div's id value on the first > > line below of the HTML/CFML. It's the div with a class of "tour-info-div" > > and I need it's id value, which is the mls_number. The #mls_number# is a > > ColdFusion variable. For this one, I tried: > > $('.update-button).parent().parent().attr('id').val() > > but I was getting an error on that one. > > > I need to send those two values, the form field tour url user entry, and the > > mls_number as values through the ajax function. > > > How would I write up these traversals? > > > Thanks for any help! > > > Rick > > > Here's the HTML/CFML: > > > <div id="#mls_number#" class="tour-info-div"> > > > <div id = "address_id_#mls_number#" style="width:300px; > > font-weight:bold;">#street_number# > > #street_name#, #city#</div> > > > <cfif not len(trim(#tour_url#))> > > <div class="no-tour">No Tour Available</div> > > <cfelse> > > <div class="tour-url">Current Tour: #tour_url#</div> > > <div class="options"> > > [ <a href="#tour_url#" target="_blank">Preview</a> ] > > [ <a class="update-link" href='##'>Update</a> ] > > [ <a href= "##">Delete</a> ] > > </div> > > </cfif> > > > <div class="update-div"> > > > <div>Edit Link:</div> > > <div><input class="textinput01 update-input" size="80" > > value="#tour_url#"></div> > > <div><input class="update-button" type="button" value="Update"></div> > > > </div> > > > </div>