[jquery-dev] Re: Display values of variable number of text boxes
instead of using attr('value')... try using val() Rick -Original Message- Date: Saturday, July 11, 2009 2:13:10 pm To: "jQuery Development" From: "barun" Subject: [jquery-dev] Re: Display values of variable number of text boxes Thanks, Rick! That's an excellent example, and I could achieve my functionality with that. However, I would like to know if we could access the value with the text box name also. For example, if we know that the text box's name is text_1, then we could use like: $("form input#text_1").attr("value"); In this case the name is dynamically generated. So, I tried with txt_name = "text_" + i;// i is a counter $("form input#" + txt_name).attr("value"); But this doesn't seem to work. Any syntactical error? This way of working would be useful in other cases too. For example, if we want to know the value of the i-th text box. Thanks, Barun. On Jul 11, 8:36 pm, Rick Waldron wrote: > When the user specifies the textareas, assign them a special "logic" > classname... like "user-textarea" > I put together an example: > > http://jsbin.com/oqomi > > Rick > > On Sat, Jul 11, 2009 at 10:25 AM, barun wrote: > > > Hi All, > > > Ther --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---
[jquery-dev] Re: JQuery could throw nicer errors
Thats brilliant. i'd be interested in working on that if the need arises (test cases etc) -Original Message- Date: Friday, September 04, 2009 10:32:32 am To: "jQuery Development" From: "Moi Ce Soir" Subject: [jquery-dev] Re: JQuery could throw nicer errors Well I had a thought. It might be a bad thing to add extra code into JQuery simply to check if the developer has been stupid. It'd be better to have a plug in that developers can add and temporarily use. I'm working on such an proof of concept plug in, so I'll post here again with the example. On Sep 4, 1:56 pm, Dave Methvin wrote: > > "$(true).html()" - Throws a TypeError with the information 'this > > [0].innerHTML is undefined > > Source File: query-1.3.2.min.js Line: 12' > > Whenever you're debugging, use the non-minimized version of jQuery. > Both Firefox and IE8 have very good debuggers, so when an error like > this occurs in the guts of jQuery you can look at the stack trace to > see how it got there from your own code or plugins. > > > "$("p").html(true)" - Reduces the HTML of all elements to nothing. > > It can be passed objects too, and the same behaviour is observed. > > That's the "Garbage in, garbage out" problem, which is hard to solve > in gen --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to jquery-dev+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~--~~~~--~~--~--~---