I suspect this may be a long post...apologies in advance.
I have a multipage form with 12 tabs (index 0-11) designed for use by users to enter data for a model. That was fine, but then they asked for the ability to have it also edit previous entries, and I'm having a weird issue with one of the event handlers that I use to read in old data.
The issue starts on this tab, which is index 3
ROIpage.JPG
If the YES radio button under Common Repairable is selected, the event handler takes them over to another tab
CommonalityPage.JPG
(which is index 9) to enter some additional data, and then come back. This works fine for new data entry, but the issue comes in when they're editing a previous entry. Here's how it should work...
This is the event handler for whenever there is a page change:
The important block of code is
So if we're on page 3, and we're in the edit mode, the code should
-- make tab index 9 visible
-- switch to tab index 9
-- make all the other tabs invisible
But here's a screen shot from when I stepped through that code in the debugger
ErrorROIPage.JPG
You'll note that the tab title is "Commonality" which is the title of tab index 9, but the contents of the tab are still index 3.
What's even more bizarre is that if I click the next button in the lower right, whose handler just says multipage1.value = multipage1.value + 1, then I'm suddenly taken to the correct tab 9. What's going on?
Bookmarks