Hi All,
I would like to ask how can one resize a frame in a website w/o
postback?
My scenario is the following
I have a left frame, a top frame, and a "contents" frame.
I placed an imagebutton in the top frame that once clicked, it will
fire
a javascript code the will resize the left frame (collapse), then if
clicked again,
it will "expand" or restore the left frame's size back to its
original size.
My problem is that whenever you click the image button in the top
frame to
resize the left frame, the top frame posts back.
Is there anyway for the top frame not to postback?
Thanks,
Henry
Javascript
================================================== =========
function jsfToggleNavFrame()
{
var frame = window.parent.document.getElementById("fstMainLayo ut");
var navFrameCol = frame.cols.substr(0, frame.cols.indexOf(','));
alert (navFrameCol);
if (navFrameCol != 216)
{
frame.cols="216,*";
}
else
{
frame.cols="*,100%";
}
}
Code Behind
================================================== =========
protected void Page_Load(object sender, EventArgs e)
{
ClientScript.RegisterClientScriptBlock(this.GetTyp e(),
"jsfUtility", "<script type='text/javascript' language='javascript'
src='./Script_Data/jsfUtility.js'></script>");
this.ibtToggleNavFrame.Attributes["OnClick"] =
"jsfToggleNavFrame();";
}