<?php echo $ajax->link('New Supplier', '/suppliers/add',
array('update'=> array('options', 'details'),
'loaded'=>'adjustLayout();')); ?>
This is supposed to call a script that re-sizes the layout based on the
longest column. It runs, but too early: the new DIV lengths aren't in
the browser yet. The second time you click the link, it works on the
length of the then-current DIVs. Here's the script (I'm using the
x-core library):
function adjustLayout()
{
// Find the window height
var size = getViewportSize();
var screenHeight = size[1];
//Adjust for screen height
xTop("footer", screenHeight-13); //Adjust for height of footer
maxHeight = screenHeight-180; //Adjust for height of masthead
// Assign max height to all columns
xHeight("details", maxHeight);
xHeight("options", maxHeight);
xShow("footer");
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---