Firefox / IE difference

Could you give me an idea why this code works as expected (ie, shows a refresh button and standard date selector, with a toolbar below it) in Firefox, but just shows the toolbar in IE 6? “times” is an array of isc.Buttons with hard-coded width of 40, if that is at all significant.

Thanks

isc.Toolbar.create({
   ID: "timeToolbar",
   width: 40 * times.size(), height:24, 
   buttons: times
}); 
		
isc.VLayout.create({
   ID: "mainLayout",
   width: 900,
   height: 700,
   members: [
      {isSeparator: true, height: 12},
      isc.HLayout.create({
         width: 900,
         height: 25,
         members: [
            isc.IButton.create({
               title: "Refresh",
               icon: "../images/refresh.png",
               click: "loadMainScreen();"
            }),
            isc.DynamicForm.create({
               autoDraw: true,
               width:400,
               fields: [ 
                  {name: "date", title:"Date", type: "date", 
                   defaultValue: sessionDate, 
                   changed: "sessionDate = value; loadMainScreen();" }
               ]
            }),
         ]
      }),
      {isSeparator: true, height: 12},
      timeToolbar
   ]
});

Hi wrussel,

Probably due to the dangling comma after the DynamicForm creation block. If you are using the SmartClient server, there may be server-side log messages about this, as there is a filter servlet called the JSSyntaxScannerFilter that scans for these errors (covered under deployment).

Also, not sure what the “isSeparator” property is being used for there (that only applies to ListGrid records and Menus in SmartClient, not Layouts), however you may be looking for LayoutSpacer, or one of the layoutMargin properties.

Exactly right, thanks. I guess I should have paid more attention to the big warnings about misplaced commas being the biggest cause of errors in Javascript - if only those things weren’t so damn hard to spot…

I put in the isSeperator lines because I’d recently done a Menu and was too lazy to look through the docs to see if I could do the same with a VLayout - I just kind of hoped they would work (which they did - I guess just because they were otherwise-empty elements with a height).

Hi wrussel,

You are correct, those simple JavaScript Objects passed in the layout.members array get auto-constructed as a basic Canvas with a height that effectively makes them serve as a spacer, however, LayoutSpacers are lighter weight (nearly free) and are recommended for this kind of usage.