473,405 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Resize Frame

Hi,
I was wondering how can one the following in ASP.net

a. Resize (Collapse/Expand) Frame A from Frame B
b. Resize (Collapse/Expand) Frame A from Frame A

example A I believe is found at MSDN or at Microsoft TechNet website.

Thanks,
Henry :)

Nov 20 '06 #1
2 3997
Hi All,

Ok, I got Resizing Frame to work, it's quite fast, however, whenever
I click on the ImageButton1 which collapses the Frame, I can hear a
"tic" sound from my speakers, and status bar in IE showed a message and
progress bar in IE showed a quick loading blue bar.

My question is now, how does Microsoft TechNet collapses and expands
its frame without the "reload feeling" as mentioned above? Reference
site is at :
http://technet2.microsoft.com/Window....mspx?mfr=true

When one clicks the small x button beside the word sync toc at the
left frame, it collapses the left frame without any "reload feeling",
then the contents frame in the right, a image when a label "show toc"
appeared, which leads me to my second question, how did they do this? a
floating div originating from the left nav frame? if originating in the
left nav frame, then that flating div actually can cross frames?

Thanks,
Henry :)
Solution to collapse frame, but with a "reload feeling" :
=========================================
protected void ImageButton1_Click(object sender,
ImageClickEventArgs e)
{
string javascript;
javascript = "<script type='text/javascript'>
window.parent.document.all.fstMain.cols='*,100%' </script>";

Page.RegisterClientScriptBlock("", javascript) ;
}

Nov 21 '06 #2
Hi All,
I've manage to resize Frame A from Frame B, where Frame B has an
ImageButton that fires a JavaScript.
My problem is that Frame B posts back always.

I've read some workarounds like placing return false;, or the other
workaround is placing javascript:void(); at postBackUrl property of the
ImageButton, the latter worked, but the frame did not resize :(

Any clues on how to go about this?? Any help will be greatly
appreciated.

Regards,
Henry :)
SOURCE============================================ ==========

<asp:ImageButton ID="ibtToggleNavFrame" runat="server"
ImageUrl="~/Image_Data/mhdToggleNavFrame.gif" Height="16px"
Width="16px" OnClick="ibtToggleNavFrame_Click" />

CODE BEHIND============================================ ==========

protected void ibtToggleNavFrame_Click(object sender,
ImageClickEventArgs e)
{
clsWikiTech clsWikiTechInst = new clsWikiTech();
bolNavFrameState = (bool) ViewState["bolNavFrameState"];

if (bolNavFrameState == true)
{
Page.RegisterClientScriptBlock("",
clsWikiTechInst.jspCollapseNavFrame());
bolNavFrameState = false;
ViewState["bolNavFrameState"] = bolNavFrameState;
}
else
{
Page.RegisterClientScriptBlock("",
clsWikiTechInst.jspExpandNavFrame());
bolNavFrameState = true;
ViewState["bolNavFrameState"] = bolNavFrameState;
};
}
CLASS============================================= =========
public class clsWikiTech
{
public string jspCollapseNavFrame()
{
string strJavaScriptText = "";
strJavaScriptText = strJavaScriptText + "<script
type='text/javascript'";
strJavaScriptText = strJavaScriptText +
"window.parent.document.all.fstMain.cols='*,10 0%' ";
strJavaScriptText = strJavaScriptText + "</script>";
return strJavaScriptText;
}

public string jspExpandNavFrame()
{
string strJavaScriptText = "";
strJavaScriptText = strJavaScriptText + "<script
type='text/javascript'";
strJavaScriptText = strJavaScriptText +
"window.parent.document.all.fstMain.cols='216, *'; ";
strJavaScriptText = strJavaScriptText + "</script>";
return strJavaScriptText;
}
}

Nov 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Curzio Basso | last post by:
Hi all, I have a problem for which I wasn't able to find an answer anywhere else, maybe someone can give me a hint... I designed with XRCed a small GUI (the code is at the bottom of the...
13
by: Giggle Girl | last post by:
Hi there, I am having a problem with the behavior of Firefox, where lefthand column content is not resized properly after it is "collapsed" and then "re-expanded". An online demo is available...
0
by: hari24patil | last post by:
Hi , I am not geting frame border in firefox i want only right border of frame to be show and all other border are hidden it work in IE but in firefox it not show border and due to that i am not...
69
by: RC | last post by:
I know how to do this in JavaScript by window.open("newFile.html", "newTarget", "scrollbars=no,resizable=0,width=200,height=200"); The browser will open a new window size 200x200, not allow...
1
by: Miaaa Mukherjee | last post by:
Hello, I have created three different menu controls. 1)headercontrol.aspx(which contains mainimage heading and midmenu) 2)leftmenu.aspx(which contains the menu thru which we can open diff...
0
by: minhajuddin | last post by:
hi i have two frames in which first frame contain tree view and and one of the node in this tree view contain the text which lager than the frame size so it is showing the text like this (...
4
by: hash4sp | last post by:
Hi ! I have a problem with my frame size. The frame is used to display results in form of html table generated dynamically. Sometimes the frame resizes its height according to the content in...
1
by: hdivecha | last post by:
i have make a jtree program in java and if the node is circle then the circle can be shown in frame and i have to resize it with slider . plz help me i have done the tree program bt how to get...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.