Environment:
TS 5.5.2 SP2b + patches on Solaris 8
Client: W2K with IE 6.0
FormAPI Code:
function callback(val){
// ...
if(val && validateOutlineLevels() && validateDates("Event")){
if (button_status == IWDatacapture.SAVE_BUTTON ||
button_status == IWDatacapture.SAVECLOSE_BUTTON)
{
IWDatacapture.save();
if (button_status == IWDatacapture.SAVECLOSE_BUTTON){
// (1)
IWdatacapture.close(false);
}
}
// (2)
return true;
}
return false;
}A Little Background:
The function is called callback because it is to be called back from a server-side callout used to test the validity of a path entered into one of the fields. Through a series of alerts which I've added and then removed - I can verify that the function is getting called, that val has a value of 1, that button_status does equal IWDatacapture.SAVECLOSE_BUTTON, and that it generally appears to be traversing through all the code as written.
Problem:
If I use the code as written above, make a small change to the DCR and click the Save & Close button - the window closes without saving.
If I add an alert() at position (2) and try the same thing, the DCR saves but does not close.
If I move the alert() to position (1) and try the same thing, the DCR closes but does not save (same behavior as without any alert).
A Little More Background:
This code essentially worked when it was not being called via a server-side callout's callback - so my guess is that the problem lies somewhere within that context - but the fact that it seems to all execute correctly (in terms of the code path) but does not execute fully correctly (in terms of actual actions taken) and executes differently based on the placement of an alert() has me pretty confused.
Anyone got any ideas on what would cause this odd behavior?
I'm hoping it's something really simple and stupid that I'm overlooking...
Note: Upgrading is
not an option at this time (
we're looking to upgrade the entire system to TS6 - but I need to make this code work [again] in the existing 5.5.2 SP2b environment now.)
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com