Hello, All.
I have an html table. The first column is a drop list with the days of the week in it Sunday through Saturday. Second column is two text boxes for start time and end time. The other column is a drop list (true/false). In the html, each row (other than the header) has a GUID for the id attribute and a class attribute.
The data in the html table comes from a database and is sorted by day of week, start time, and stop time.
I am being told to reorder the table when a new choice is made from the day of week drop list (OnChange is firing no problem).
Example: Here is an example that could need to change since there is an error in the database.
Sunday 00:00 - 23:59 Off
Monday 00:00 - 08:29 Off
Monday 00:00 - 08:29 Off
Monday 08:30 - 16:59 On
Monday 17:00 - 23:50 Off
Tuesday 08:30 - 16:59 On
Tuesday 17:00 - 23:59 Off
The select would change it to this:
Sunday 00:00 - 23:59 Off
Monday 00:00 - 08:29 Off
Tuesday 00:00 - 08:29 Off
Monday 08:30 - 16:59 On
Monday 17:00 - 23:50 Off
Tuesday 08:30 - 16:59 On
Tuesday 17:00 - 23:59 Off
Now I need it to reorder to this:
Sunday 00:00 - 23:59 Off
Monday 00:00 - 08:29 Off
Monday 08:30 - 16:59 On
Monday 17:00 - 23:50 Off
Tuesday 00:00 - 08:29 Off
Tuesday 08:30 - 16:59 On
Tuesday 17:00 - 23:59 Off
I am new to javascript, so I don't even know where to begin. My OnChange is firing, so at least that is in place.
I am doing my javascript in a .cshtml page
I am doing what I am told, so 'why would you do that when you could use a datatable?' will not be a helpful suggestion.
Thanks, Everyone.
Patrick B
I have an html table. The first column is a drop list with the days of the week in it Sunday through Saturday. Second column is two text boxes for start time and end time. The other column is a drop list (true/false). In the html, each row (other than the header) has a GUID for the id attribute and a class attribute.
The data in the html table comes from a database and is sorted by day of week, start time, and stop time.
I am being told to reorder the table when a new choice is made from the day of week drop list (OnChange is firing no problem).
Example: Here is an example that could need to change since there is an error in the database.
Sunday 00:00 - 23:59 Off
Monday 00:00 - 08:29 Off
Monday 00:00 - 08:29 Off
Monday 08:30 - 16:59 On
Monday 17:00 - 23:50 Off
Tuesday 08:30 - 16:59 On
Tuesday 17:00 - 23:59 Off
The select would change it to this:
Sunday 00:00 - 23:59 Off
Monday 00:00 - 08:29 Off
Tuesday 00:00 - 08:29 Off
Monday 08:30 - 16:59 On
Monday 17:00 - 23:50 Off
Tuesday 08:30 - 16:59 On
Tuesday 17:00 - 23:59 Off
Now I need it to reorder to this:
Sunday 00:00 - 23:59 Off
Monday 00:00 - 08:29 Off
Monday 08:30 - 16:59 On
Monday 17:00 - 23:50 Off
Tuesday 00:00 - 08:29 Off
Tuesday 08:30 - 16:59 On
Tuesday 17:00 - 23:59 Off
I am new to javascript, so I don't even know where to begin. My OnChange is firing, so at least that is in place.
I am doing my javascript in a .cshtml page
I am doing what I am told, so 'why would you do that when you could use a datatable?' will not be a helpful suggestion.
Thanks, Everyone.
Patrick B