473,385 Members | 1,814 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,385 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 3996
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.