Two Laptop Bag
The moose likes HTML, CSS and JavaScript and the fly likes Help needed with jquery and input text Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "Help needed with jquery and input text " Watch "Help needed with jquery and input text " New topic
Author

Help needed with jquery and input text

Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
Here is the input text that gets generated depending on the number of rows

What im trying to achieve is saving the data when ever there is a some data entered and someone tabs out of the notes text box

Here is the jquery part


The problem that im facing is frustrating

No matter which row data i change , the first row data is saved .

Please help me out solve this thing .

Please do reply if my question isnt clear

Cheers
Jquery Noob
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Please UseCodeTags when posting code or configuration. Unformatted code and configuration is very difficult to read. You can edit your post to include them by using the button.

It's also helpful to remove commented-out code rather than making the reader determine what's important and what isn't.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
First, you have multiple hidden elements with the same id [id="itemId"], that is illegal in HTML.

The problem with your code is due to the fact you are not limiting the onblur to the row you are in, you are looking at the start of the document again.

You either want to traverse to the parent and look for the elements or you can grab what ever is after the _ in the current id you got



Eric


Naveen puttu
Ranch Hand

Joined: Sep 15, 2009
Posts: 88
That was really helpful mate . thanks
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Help needed with jquery and input text
 
Similar Threads
Jquery with table data markup
Jquery with dynamic rows
jQuery.ajax() issue with chrome and IE 8
calling the struts action on jquery button click
focusing on an input element with jquery