Hi there,
I was wondering if anyone can resolve my problem.

Just to give you a heads up.
I have a page with many input fields like textboxes, select etc.
All these input fields are on one line in a table row.
The number of rows depends on the amount of data in a MYSQL DB.
Currently I have an update button on each row where the user can update amended fields.
The update is done via ajax where onClick of the update button it will run a function and then pass all the values of the fields to a PHP function.

All this works absolutely fine but I was trying to eliminate the update button and instead update the whole row onChange or onBlur etc. I do not want to add an event handler to each input fields as this will create more work.
I have tried the onBlur event on the tr but this would not work!

I have tried many different ways and the only thing that would worked was the mouse events but these can be very annoying as every time the user moves the mouse it will carry out the update function which isn't what I want it to do.

Any suggestions?
Hope you can help.

Thanks
Jat

I think instead of giving update button in all rows. keep one update button at bottom.
Let user change everything across the rows and then let him press update button only once.
If you attempt to update table on so many events, it will impose extra load on your server.

Hi thanks for the reply but my client requires an update per row rather than for all rows. And sorry to re-iterate but I need an auto event handler method rather than an onCick button method.

Send the html code of your "Currently I have an update button on each row where the user can update amended fields." module.

Send the current working script) code associated with these buttons.

We might be able to translate it to what you actually need.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.