I have an object that looks like this:
StandardFormat({
HeaderFont: 'greentext2',
HeaderLinkFont: 'bluelink3',
Backcolor: 'Black',
...
});
So far, I have a function that has this form:
FormatGrid(ID, HeaderFont, HeaderLinkFont, BackColor,...){}
All the parameters are listed and must be supplied in the call. What I’d like to do is replace it with this:
FormatGrid(ID, Format){}
That way, I could write something like this:
FormatGrid('TopGrid', StandardFormat); and be able to send the id of the grid and any format object.
I’m kinda stuck. How do you merge the parameters?
Thanks for your suggestions.
You could do…
jsFiddle.
This unpacks to
windowhowever.