I've a table on the change of which , I'm making an ajax call. I need to set the value from the success result of the ajax call to a td value of the tabe.
I'm referencing the td as var abc = $(this).closest.('tr').find('.classNameOf-td').val();
To this abc, I'm setting the value fro the result as abc = result.value();.
I gave an alert and seeing the value in the alertbox. But it doesn't get set to the label in the td and doesn't get displayed on the form.
I've a table on the change of which , I'm making an ajax call. I need to set the value from the success result of the ajax call to a td value of the tabe.
I'm referencing the td as var abc = $(this).closest.('tr').find('.classNameOf-td').val();
To this abc, I'm setting the value fro the result as abc = result.value();.
I gave an alert and seeing the value in the alertbox. But it doesn't get set to the label in the td and doesn't get displayed on the form.
Any suggestions as to how to make it wotk?
The community cannot see the markup which makes it tough to validate the code. I assume you need to read the text or html from the selector. The .val() function is used to read inputs. See the jQuery reference documentation for the proper syntax.
None
0 Points
6 Posts
Jquery ajax
Aug 02, 2020 03:01 PM|san25|LINK
I've a table on the change of which , I'm making an ajax call. I need to set the value from the success result of the ajax call to a td value of the tabe.
I'm referencing the td as var abc = $(this).closest.('tr').find('.classNameOf-td').val();
To this abc, I'm setting the value fro the result as abc = result.value();.
I gave an alert and seeing the value in the alertbox. But it doesn't get set to the label in the td and doesn't get displayed on the form.
Any suggestions as to how to make it wotk?
All-Star
53001 Points
23587 Posts
Re: Jquery ajax
Aug 02, 2020 03:09 PM|mgebhard|LINK
The community cannot see the markup which makes it tough to validate the code. I assume you need to read the text or html from the selector. The .val() function is used to read inputs. See the jQuery reference documentation for the proper syntax.
https://api.jquery.com/text/
https://api.jquery.com/html/
https://api.jquery.com/val/
None
0 Points
6 Posts
Re: Jquery ajax
Aug 02, 2020 07:41 PM|san25|LINK
Thank you, appreciate your help. I did try those but am not getting empty value back when I use .text() or .html().
I agree, it is hard to tell without seeing the markup. Will try posting the markup