|
Comments and Discussions
|
|
 |
 |
Very good!
Thanks for sharing.
|
|
|
|
 |
Collapsible panel is one of the exotic controls present in Ajax Control Toolkit of ASP.NET. Apart from several built in functionalities, there are situations when the user needs to close (collapse) or open (expand) the collapsible panel through script. Further, there are “ExpandControlId” and “CollapseControlId” attributes present in the collapsible panel to control the collapse and expand on click events of respective assigned controls , yet sometimes we need to do it by other events.
Thanks
http://www.mindfiresolutions.com/Collapsible-Panel--Expand-and-Collapse-using-Javascript-in-ASPNET-698.php[^]Cheers,
Eliza
|
|
|
|
 |
very well
|
|
|
|
|
 |
this is my example!! Expandable / Collapsable can not Collapsable all items where there are two or more panel!!!!!!!!
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
<script type="text/javascript" src="JS/Panel.js"></script>
<script type="text/javascript">
var oPanel = null;
window.onload = function()
{
var Args = {
Base: document.getElementById('parent'),
HeaderText: 'JLKEngine中间件平台',
Width: 320,
ClickEventListener: OnClick
};
oPanel = new Panel(Args);
oPanel.InsertItem('JLKEngine中间件平台技术白皮书', 'JLK01');
oPanel.InsertItem('JLKEngine中间件平台功能简介', 'JLK02');
oPanel.InsertItem('JLKEngine中间件2008试用版', 'JLK03');
oPanel.InsertItem('JLKEngine中间件授权序列号', 'JLK04');
oPanel.InsertItem('JLKEngine中间件安装使用说明', 'JLK05');
oPanel.InsertItem('基于JLKEngine中间件应用扩展开发文档', 'JLK06');
oPanel.InsertItem('基于JLKEngine中间件应用框架搭建实例', 'JLK07');
oPanel.InsertItem('基于JLKEngine中间件的二次开发帮助', 'JLK08');
oPanel.InsertItem('基于JLKEngine中间件详细介绍', 'JLK09');
var Args1 = {
Base: document.getElementById('parent1'),
HeaderText: '基于JLKEngine的GIS应用产品',
Width: 320,
ClickEventListener: OnClick
};
oPanel = new Panel(Args1);
oPanel.InsertItem('基于JLKEngine数字化建库平台设计', 'JLKEx01');
oPanel.InsertItem('基于JLKEngine的GIS应用框架扩展设计', 'JLKEx02');
oPanel.InsertItem('JLKScene产品功能介绍', 'JLKEx03');
oPanel.InsertItem('JLKGlobe产品功能介绍', 'JLKEx04');
oPanel.InsertItem('JLKMap产品功能介绍', 'JLKEx05');
oPanel.InsertItem('JLKChecker产品功能介绍', 'JLKEx06');
oPanel.InsertItem('JLKMap产品功能介绍', 'JLKEx05');
oPanel.InsertItem('JLKChecker产品功能介绍', 'JLKEx06');
var Args2 = {
Base: document.getElementById('parent2'),
HeaderText: 'SuperFlow工作流及SuperOA',
Width: 320,
ClickEventListener: OnClick
};
oPanel = new Panel(Args2);
oPanel.InsertItem('SuperFlow工作流平台技术白皮书 ', 'SuperFlow01');
oPanel.InsertItem('SuperFlow工作流平台简介', 'SuperFlow02');
oPanel.InsertItem('SuperFlow工作流管理使用手册', 'SuperFlow03');
oPanel.InsertItem('基于构件化的GIS工作流中间件整体解决方案 ', 'SuperFlow04');
oPanel.InsertItem('SuperFlow工作流详细介绍', 'SuperFlow05');
oPanel.InsertItem('SuperOA办公自动化系统功能简介', 'SuperOA01');
oPanel.InsertItem('SuperOA办公自动化系统操作手册', 'SuperOA02');
}
var OnClick = function(Sender, EventArgs)
{
//var Message = new Array();
//Message.push('Text: ' + EventArgs.Text);
//Message.push('Value: ' + EventArgs.Value);
//document.getElementById('DivMessage').innerHTML = Message.join('<br />');
switch(EventArgs.Value)
{
case "JLK01":
//alert('Insert1');
window.open("http://www.linjon.cn/Download/JLKEngine中间件平台技术白皮书.rar");
break;
case "JLK02":
window.open("http://www.linjon.cn/Download/JLKEngine中间件平台功能简介.rar");
break;
case "JLK03":
window.open("http://www.linjon.cn/Download/JLKEngine2008-Release.rar");
break;
case "JLK04":
window.open("http://www.linjon.cn/Download/获取客户机序列号.rar");
break;
case "JLK05":
window.open("http://www.linjon.cn/Download/JLKEngine中间件平台安装使用说明.rar");
break;
case "JLK06":
window.open("http://www.linjon.cn/Download/基于JLKEngine中间件应用扩展开发文档.rar");
break;
case "JLK07":
window.open("http://www.linjon.cn/Download/基于JLKEngine中间件应用框架搭建实例.rar");
break;
case "JLK08":
window.open("http://www.linjon.cn/Download/基于JLKEngine中间件的二次开发帮助.rar");
break;
case "JLK09":
window.location.href="http://www.linjon.cn/JLKEngine.aspx";
break;
case "JLKEx01":
window.open("http://www.linjon.cn/Download/基于JLKEngine数字化建库平台设计.rar");
break;
case "JLKEx02":
window.open("http://www.linjon.cn/Download/基于ArcGIS的JLKEngine中间件平台框架设计.rar");
break;
case "JLKEx03":
window.open("http://www.linjon.cn/Download/基于ArcEngine的JLKScene产品功能介绍.rar");
break;
case "JLKEx04":
window.open("http://www.linjon.cn/Download/基于ArcEngine的JLKScene产品功能介绍.rar");
break;
case "JLKEx05":
window.open("http://www.linjon.cn/Download/JLKMap数字化建库平台V2.0功能介绍.rar");
break;
case "JLKEx06":
window.open("http://www.linjon.cn/Download/AutoCADDataCheck使用手册.rar");
break;
case "SuperFlow01":
window.open("http://www.linjon.cn/Download/SuperFlow工作流平台技术白皮书.rar");
break;
case "SuperFlow02":
window.open("http://www.linjon.cn/Download/SuperFlow工作流平台简介.rar");
break;
case "SuperFlow03":
window.open("http://www.linjon.cn/Download/SuperFlow工作流管理使用手册.rar");
break;
case "SuperFlow04":
window.open("http://www.linjon.cn/Download/基于构件化的GIS工作流中间件整体解决方案.rar");
break;
case "SuperFlow05":
window.location.href="http://www.linjon.cn/SuperFlow.aspx";
break;
case "SuperOA01":
window.open("http://www.linjon.cn/Download/SuperOA办公自动化系统功能简介.rar");
break;
case "SuperOA02":
window.open("http://www.linjon.cn/Download/SuperOA办公自动化系统操作手册.rar");
break;
}
}
window.onunload = function(){ oPanel.Dispose(); }
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table align=center>
<tr>
<td>
<div id="parent1">
</div>
<div id="DivMessage1">
</div>
</td>
<td></td>
</tr>
<tr>
<td height=5>
</td>
</tr>
<tr>
<td>
<div id="parent2">
</div>
<div id="DivMessage2">
</div>
</td>
<td></td>
</tr>
</table>
</div>
</form>
</body>
</html>
|
|
|
|
 |
Nice job Samir, I just thinking it could be more flexible using a css file instead hard coded color.
Thanks.
|
|
|
|
 |
Thanks. Of course using CSS will more flexible but i want to develop it as a class without depending on other files.
|
|
|
|
 |
when I play muti panel , and each panel have mutiitems, there is a bug, can you support as soon as possible??
|
|
|
|
 |
1,Expandable / Collapsable can not work when more Panel Control together !!
2,Expandable / Collapsable is slowly, can you modify?
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Expandable / Collapsable </title>
<script type="text/javascript" src="Inc/Panel.js"></script>
<script type="text/javascript">
var oPanel = null;
window.onload = function()
{
var Args = {
Base: document.getElementById('parent'),
HeaderText: 'JLKEngine中间件平台',
Width: 350,
ClickEventListener: OnClick
};
oPanel = new Panel(Args);
oPanel.InsertItem('JLKEngine中间件平台技术白皮书', 'JLK01');
oPanel.InsertItem('JLKEngine中间件平台功能简介', 'JLK02');
oPanel.InsertItem('JLKEngine中间件2008试用版', 'JLK03');
oPanel.InsertItem('JLKEngine中间件授权序列号', 'JLK04');
oPanel.InsertItem('JLKEngine中间件安装使用说明', 'JLK05');
oPanel.InsertItem('基于JLKEngine中间件应用扩展开发文档', 'JLK06');
oPanel.InsertItem('基于JLKEngine中间件应用框架搭建实例', 'JLK07');
oPanel.InsertItem('基于JLKEngine中间件的二次开发帮助', 'JLK08');
oPanel.InsertItem('基于JLKEngine中间件详细介绍', 'JLK09');
var Args1 = {
Base: document.getElementById('parent1'),
HeaderText: '基于JLKEngine的GIS应用产品',
Width: 350,
ClickEventListener: OnClick
};
oPanel = new Panel(Args1);
oPanel.InsertItem('基于JLKEngine数字化建库平台设计', 'JLKEx01');
oPanel.InsertItem('基于JLKEngine的GIS应用框架扩展设计', 'JLKEx02');
oPanel.InsertItem('JLKScene产品功能介绍', 'JLKEx03');
oPanel.InsertItem('JLKGlobe产品功能介绍', 'JLKEx04');
oPanel.InsertItem('JLKMap产品功能介绍', 'JLKEx05');
oPanel.InsertItem('JLKChecker产品功能介绍', 'JLKEx06');
oPanel.InsertItem('JLKMap产品功能介绍', 'JLKEx05');
oPanel.InsertItem('JLKChecker产品功能介绍', 'JLKEx06');
var Args2 = {
Base: document.getElementById('parent2'),
HeaderText: 'SuperFlow工作流及SuperOA',
Width: 350,
ClickEventListener: OnClick
};
oPanel = new Panel(Args2);
oPanel.InsertItem('SuperFlow工作流平台技术白皮书 ', 'SuperFlow01');
oPanel.InsertItem('SuperFlow工作流平台简介', 'SuperFlow02');
oPanel.InsertItem('SuperFlow工作流管理使用手册', 'SuperFlow03');
oPanel.InsertItem('基于构件化的GIS工作流中间件整体解决方案 ', 'SuperFlow04');
oPanel.InsertItem('SuperFlow工作流详细介绍', 'SuperFlow05');
oPanel.InsertItem('SuperOA办公自动化系统功能简介', 'SuperOA01');
oPanel.InsertItem('SuperOA办公自动化系统操作手册', 'SuperOA02');
}
var OnClick = function(Sender, EventArgs)
{
//var Message = new Array();
//Message.push('Text: ' + EventArgs.Text);
//Message.push('Value: ' + EventArgs.Value);
//document.getElementById('DivMessage').innerHTML = Message.join('<br />');
switch(EventArgs.Value)
{
case "JLK01":
//alert('Insert1');
window.open("http://www.linjon.cn/Download/JLKEngine中间件平台技术白皮书.rar");
break;
case "JLK02":
window.open("http://www.linjon.cn/Download/JLKEngine中间件平台功能简介.rar");
break;
case "JLK03":
window.open("http://www.linjon.cn/Download/JLKEngine2008-Release.rar");
break;
case "JLK04":
window.open("http://www.linjon.cn/Download/获取客户机序列号.rar");
break;
case "JLK05":
window.open("http://www.linjon.cn/Download/JLKEngine中间件平台安装使用说明.rar");
break;
case "JLK06":
window.open("http://www.linjon.cn/Download/基于JLKEngine中间件应用扩展开发文档.rar");
break;
case "JLK07":
window.open("http://www.linjon.cn/Download/基于JLKEngine中间件应用框架搭建实例.rar");
break;
case "JLK08":
window.open("http://www.linjon.cn/Download/基于JLKEngine中间件的二次开发帮助.rar");
break;
case "JLK09":
window.location.href="http://www.linjon.cn/JLKEngine.aspx";
break;
case "JLKEx01":
window.open("http://www.linjon.cn/Download/基于JLKEngine数字化建库平台设计.rar");
break;
case "JLKEx02":
window.open("http://www.linjon.cn/Download/基于ArcGIS的JLKEngine中间件平台框架设计.rar");
break;
case "JLKEx03":
window.open("http://www.linjon.cn/Download/基于ArcEngine的JLKScene产品功能介绍.rar");
break;
case "JLKEx04":
window.open("http://www.linjon.cn/Download/基于ArcEngine的JLKScene产品功能介绍.rar");
break;
case "JLKEx05":
window.open("http://www.linjon.cn/Download/JLKMap数字化建库平台V2.0功能介绍.rar");
break;
case "JLKEx06":
window.open("http://www.linjon.cn/Download/AutoCADDataCheck使用手册.rar");
break;
case "SuperFlow01":
window.open("http://www.linjon.cn/Download/SuperFlow工作流平台技术白皮书.rar");
break;
case "SuperFlow02":
window.open("http://www.linjon.cn/Download/SuperFlow工作流平台简介.rar");
break;
case "SuperFlow03":
window.open("http://www.linjon.cn/Download/SuperFlow工作流管理使用手册.rar");
break;
case "SuperFlow04":
window.open("http://www.linjon.cn/Download/基于构件化的GIS工作流中间件整体解决方案.rar");
break;
case "SuperFlow05":
window.location.href="http://www.linjon.cn/SuperFlow.aspx";
break;
case "SuperOA01":
window.open("http://www.linjon.cn/Download/SuperOA办公自动化系统功能简介.rar");
break;
case "SuperOA02":
window.open("http://www.linjon.cn/Download/SuperOA办公自动化系统操作手册.rar");
break;
}
}
window.onunload = function(){ oPanel.Dispose(); }
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table align="center" cellpadding="0" cellspacing="0" width="550px" height="100%" border="0" bgcolor="#FFFFFF">
<tr>
<td>
<div id="parent">
</div>
<div id="DivMessage">
</div>
</td>
</tr>
<tr>
<td height=5>
</td>
</tr>
<tr>
<td>
<div id="parent1">
</div>
<div id="DivMessage1">
</div>
</td>
</tr>
<tr>
<td height=5>
</td>
</tr>
<tr>
<td>
<div id="parent2">
</div>
<div id="DivMessage2">
</div>
</td>
<tr>
</table>
</div>
</form>
</body>
</html>
|
|
|
|
 |
Take a look at Extjs.com!
Pleading sagacious indoctrination
|
|
|
|
|
 |
Have you considered using prototype to assign your methods instead of declaring them within your constructor?
function MyConstructor()
{
this.method = function ()
{
...
}
}
VS.
function MyConstructor()
{
...
}
MyConstructor.prototype.method = function()
{
...
}
The difference is, when declared within your constructor and not via prototype, those functions/method are recreated for each instance of your object. Not really an issue if you only have one or two objects, but when you start adding a bunch, it's a waste of memory.
The drawback to this is that it's more difficult to keep things public/private, since "private" variables cannot be access via prototyping. Considering the concept of public/private variables doesn't really exist in Javascript anyway, the trade off is entirely up to you. I usually create an object called "internal" or something and use it to pass around the stuff I want to be "private". It can still be accessed, but it's easy to say "this object is used internally so don't screw with it".
Also, http://jslint.com/ is a great place to verify your code follows "best practice". Be warned, it WILL hurt you feelings!
Keep up the great work! Your controls are awesome!
|
|
|
|
 |
Thanks Helbrax for updating my knowledge. Does it means that we should use prototype for public method & put private members inside the class?
|
|
|
|
 |
Public/Private members are really just a matter of function scope in javascript, rather than a strict declaration. So keeping everything within the function gives you some pseudo private/public functionality, but that tends to break down when you begin to use prototype, since variables declared within your constructor are no longer in scope. The only way to pass variables around is by setting a property within the object. The side effect to this is that the members become "public".
I usually just slap things in an object and use that as a namespace. Then I explicitly say "this namespace is used internally blah blah blah don't mess with it".
function MyObject()
{
var foo;
foo = 'bar';
this.morefoo = 'bar';
//I'll put everything I want "private" here.
//It doesn't make it private, but at least it's all in one place.
this.myprivatestuff = {};
}
MyObject.prototype.quack = function ()
{
alert(foo); //throws an error. out of scope.
alert(this.morefoo); //works.
}
The other work around is to create accessor methods in your constructor to return your private data. This would allow you 'GET' the variables, 'SET' them or both. It has less overhead of declaring every single method within the constructor, and will let you keep a bit more of your privacy in tact.
function MyObject ()
{
var foo;
foo = 'blah';
this.getFoo = function ()
{
return foo;
};
}
MyObject.prototype.quack = function ()
{
alert(this.foo); //barks an error, foo is out of scope nor is it a property of this object
alert(this.getFoo()); //works. foo was wrapped in a 'closure' within our constructor. We can access it's value, but we can't change it.
};
|
|
|
|
 |
very good work, nice article, keep on working
Ali Raza
software engineer
ICT pepsi-cola
lahore
|
|
|
|
|
 |
Thanks. I learned a lot from your examples. Keep up the good work.
|
|
|
|
|
 |
Hi Sir,
Once again I found a great work from your side for all of us.
I was searching the code for a long time by which a list Item slides on window slowly.
Thanks for your contribution.
|
|
|
|
 |
Thanks Sandeep for liking my effort.
|
|
|
|
 |
hi
this artocle is really excellent.....
keep it up.
|
|
|
|
|
|
|
|
|
|
 |
Thanks Azam. Actually i wanted to create my own that's why i have spent some time to it.
|
|
|
|
 |
Azam if you've played around with many of the js frameworks around out there you'll find alot of them do this in 1 or 2 lines of code. YUI is another, Jquery, mootools and more i've used YUI to do a similar control on my website except mines ALOT cooler !! . It fades IN & OUT !
*see link below*
Kanedogg horoscope control >NET javascript YUI about 15lines.
But to give credit this control is nice! Good work....
Cheers
"biggest fish in pond, NOT always catch the fly"
|
|
|
|
|
 |
Good example of visualization and java script.
|
|
|
|
|
 |
Nice Samir,
5 from me !!!
|
|
|
|
|
 |
did you check my article on IIS 7.0.
|
|
|
|
 |
Not yet but certainly I'll read it today.
|
|
|
|
|
 |
|
General News Suggestion Question Bug Answer Joke Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
|
|