Well just to let you all know, I've implemented a "Set Feature" which will be used by the "Monster Keep" (MK) Calculator. I realized that listing ALL "cards" in one "dropdown" would be very un-user-friendly. So I've spent the last couple days coding, googling and sweating over 50% of the issue...
Basically there are TWO (2) dropdowns and I've gotten ONE (1) of them to cache and swap between sets in a VERY user-friendly fashion. Potentially the feature can support TONS of sets ... and is very intuitive too.
Now I've got to code it for the other dropdown and also repeat all changes for the MOBILE version which is a separate page (because it was less difficult to manage 2 pages instead of one single page). This has to do with differences in the CSS file: one mobile and one tablet/desktop/laptop.
I'll reply to this thread once all the work will be done. Probably somewhere around Thursday evening!
Cheers.
Well the PRIMARY issue is that the Calculator uses AJAX for an Asynchronous call which uses a TINY "Footprint": 400 bytes to refresh the card information. That's pretty darn small! And when I was experimenting with the Card Sets, I had a solution about half way done that "could" have just refreshed the page. But refreshing the page is a COSTLY action: Over 10k and almost 11,000 bytes!
So I kept thinking about how I could IMPROVE on the solution such that it too could only take like 400 bytes... And I found a solution. It was much like the way I wanted to DESIGN IT... But I was unsure if it would work 100%. Well it turns out that minor some tweaking for Internet Explorer, it works perfectly (once I got the cross-browser compatible code).
Now it only takes 400 bytes when you swap Card Sets (a refresh is needed because the stats of the new card need refreshing and a re-calculation is done to make sure the values are correct also).