check out this:
How to get selected option value and text in a modal when clicked on a table row
Hello community. I have a data in a table, when click on any table row, it opens a modal for editing with the data in the table row. I need help on how when i click on the table row, i will get the option value and text selected in the text box. I am using jquery. thanks
In one statement you said table row, and another you said select option.
Which one are you actually working with.
Are you using TR click event.
Are you using Ajax to bring up the data to edit.
I am just confused on this option select what does it have to do with bringing up the record to edit.
The previously saved record's data is stored in the database.
Very sorry but the question made my head kind of spin.
Also if you are confused on how to show what was previously selected in a select option please search here as this has been covered several times.
site:laracasts.com your search sentence
In fact I answered that very question just a few days ago.
i don't know if i ca learn vue within a week
Doing this in jQuery will also take a little while to learn.
You have a week and don't understand how to get a previously stored select option from the database.
You probably need to slow down and take a deep breath and just take some quality time to learn this stuff.
See: https://drive.google.com/file/d/0B1_PFw--3o74TC16eXRBYXZBNFk/view
Notice about midway the edit part.
The flow is:
- a div with display:none
- a click event triggers ajax, display:block, shows data
- click event to save data using ajax
- div is now display:none
- re-display the content of the original div content, your table with ajax
Just a short explanation, but I'd suggest you find and take some free or paid Jquery ajax tutorials.
It's hard to give months of learning in a forum thread.
Also note it's a master detail in example:
https://i.imgur.com/7l7DaPM.jpg

Very top is parent (master), table is children (invoice details).
Please or to participate in this conversation.