Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Debugging FormAPI
System
Visual Studio .NET seems to be the answer (no more alerts!). What are other people using that might be less expensive?
Find more posts tagged with
Comments
Adam Stoller
a bunch of alert()'s
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
Migrateduser
With VS.net installed, when JavaScript crashes (such as IWDatacapture.getItem( 'doesnotexist' ).getChildren(), it prompts to start the debugger and takes you right to the line of code giving the problem. That's usually good enough for me, but you can also see the values of variables by hovering over them and who knows what else. I remember something like Microsoft Script Debugger doing similar things but I can't remember where I got that and can't find it now.
Migrateduser
Because VS apparently catches every invalid JavaScript execution, working on a machine with this installed has uncovered what appear to be bugs in the DCT JavaScript delivered by Interwoven (trying to access the -1th element of an array, etc.) that were not being caught before.
Migrateduser
There's bugs in Interwoven's code??? Say it ain't so.
- Jason
Migrateduser
I also was quite shocked - normally their code is "rock" solid. I reloaded and reloaded and reloaded and yet the flaw persists.
In dc_item.js:
if ( formElement.type == "select-one" )
{
var selectedIndex = formElement.selectedIndex;
var options = formElement.options;
var selectedOption = options[ selectedIndex ];
var value = selectedOption.value;
this.setOptionValue( value, true );
}
In this case selectedIndex = -1;
Lex
Doesn't -1 indicate that no selection has been made? What circumstances are causing this bug to appear?
Darryl
Migrateduser
Yeah that would be my guess. I can't give the exact circumstances, something like clicking on a drop-down while it is being populated by a callServer. But I think the code should just handle -1 and do nothing.
Migrateduser
Actually there seem to be lots of bugs - mainly having to do with callServer populating drop-downs and such while various Interwoven functions (refreshTree, etc.) are trying to access those items. I think most of the time the browser would silently ignore these errors, but I wonder what side effects they could have. Makes me crave a true application server for forms...