Hi,
Indeed my server
Regarding the styling, I’m currently more concerned with the JS side of things. The styling should be easy to do once the JS is working properly.
The code from your original page was quite tangled and I thought this would be a nice exercise in making it more readable and maintainable.
To that end, I normally first separate concerns (e.g. CSS in a separate file, JS in a separate file), implement just the core functionality (what we currently have), then look at the best way to add the required additional features.
We will certainly get to this, but these are more advanced areas.
We need to get the add/delete functionality working first.
[quote=“MrTIMarshall,post:19,topic:42665”]
I don’t have a clue what this means exactly. This part of the website is for the administration panel to edit or create a new table. I am thinking able implementing an undo feature if this is anything to do with deleted being saved?..
What do you mean by a deleted panel?[/QUOTE]
Well, in your original JS you had:
var MaxInputs = 8;
This meant that the user could hit the add button 9 times (the index being zero based).
You would then have accordion panels with the headings 1-9 (i.e. column 1, column 2 etc …)
If you hit the add button a tenth time, nothing happens (the MaxInputs limit was reached).
If you then delete 8 of the nine panels (so that only “column 1” is left), then hit the add button again, what do you expect to happen?
In your current demo nothing happens, as the MaxInputs limit was reached and deleting the accordion panels doesn’t decrease the count.
I would have thought that it was your intention to have a maximum of 8 (or 9?) accordion panels showing at any one time.
If you let me know, I’ll get the add / delete functionality working properly.