|
WebControls is a 100% pure JavaScript
(see browser compatibility)
suite of components. WebControls object model makes it easy to create visually
appealing menus, toolbars, treeviews and buttons. If you ever created a toolbar
or a menu using any 4GL language (e.g. C++, C#, VB, Java etc.) then using
WebControls framework will be a snap.
This is how you create a toolbar using JavaScript:
function MyToolbarClickHandler(btn){
alert(btn.name + " clicked");
}
function MyToolbar(){
var containerStyle = new WebControls.ContainerStyle();
var controlStyle = new WebControls.ControlStyle();
controlStyle.SetStyle(State.RELEASED,"black","yellow","outset","red");
controlStyle.SetStyle(State.OVER,"black","lavender","outset","royalblue");
controlStyle.SetStyle(State.PRESSED,"white","green","inset","yellow");
controlStyle.borderWidth = 3;
var toolbar = new WebControls.Toolbar("MyToolbar",containerStyle,120,28);
toolbar.items.style = controlStyle;
toolbar.items.Add("button1","Button1 Text");
toolbar.items.Add("button2","Button2 Text");
toolbar.items.Add("button3","Button3 Text");
toolbar.OnClick = MyToolbarClickHandler;
}
MyToolbar();
Later in the page:
< script language=javascript>
WebControls.Controls("MyToolbar").ShowRelative();
< /script>
The result would be:
Creating menus, treeviews, buttons and panels is as easy as toolbars. Highlights
include scrolling containers, possibility to embed HTML and forms into
controls, reach GUI capabilities and much more.
WebControls framework comes with ASP.NET, Java and ASP server-side helpers that
can be used with C#, VB.NET, VBScript and Java in .Net Framework and J2EE
environments and a variety of web servers. Server-side helpers objects model
mirrors the JavaScript object model and allows creation of WebControls
components on server side with all strength of 4GL languages including
database-driven dynamic content.
This is how you create a toolbar using server-side ASP.Net helper (Java code is almost indentical),
assuming reader[0] is item name, reader[1] is item text and reader[2] is item url,
With this scenario in mind, companies and small businesses should be careful in their search for SEO companies with competent SEO services. While by outsourcing the seo Services to other firms that are dedicated to SEO services WebControls wctrl = new WebControls();
WebControls.ContainerStyle containerStyle = wctrl.ContainerStyle();
WebControls.ControlStyle controlStyle = wctrl.ControlStyle();
controlStyle.SetStyle(State.RELEASED,"black","yellow","outset","red");
controlStyle.SetStyle(State.OVER,"black","lavender","outset","royalblue");
controlStyle.SetStyle(State.PRESSSED,"black","lavender","inset","royalblue");
controlStyle.borderWidth = 4;
WebControls.WebContainer toolbar = wctrl.Toolbar("MyToolbar",containerStyle,120,22);
toolbar.items.style = controlStyle;
while(reader.Read())
{
WebControls.WebControl item = toolbar.items.Add(reader.GetString(0),reader.GetString(1));
item.SetUrl(reader.GetString(http://www.uolweb.com/spacer.gif));
}
.
.
.
String javaScript = wctrl.GetScript();
The same in VBSript (ASP):
Set wctrl = new WebControls
Set cntrStyle = wctrl.ContainerStyle
Set ctrlStyle = wctrl.ControlStyle
ctrlStyle.SetStyle State.RELEASED,"black","yellow","outset","red"
ctrlStyle.SetStyle State.OVER,"black","lavender","outset","royalblue"
ctrlStyle.SetStyle State.PRESSED,"black","lavender","inset","royalblue"
ctrlStyle.borderWidth = 4
Set toolbar = wctrl.Toolbar("MyToolbar",cntrStyle,120,22,"","")
Set toolbar.items.style = ctrlStyle
while NOT rst.EOF
Set item = toolbar.items.Add(CStr(rst.Fields(0).Value),CStr(rst.Fields(1).Value,"","")
item.SetUrl CStr(http://www.uolweb.com/spacer.gif).Value),"",""
rst.MoveNext
Wend
.
.
.
javaScript = wctrl.GetScript("")
|