Understand prototype in JavaScript (JavaScript prototype)

26 בפברואר 2008

Understand prototype in JavaScript Hi Guy’s Sorry on this syntaxed post, but I think for understand syntax you will read. Follow my comments Hope!!! // Namespace core function core() { return this.constructor(''); } core.prototype = { // String type version:'', constructor: function(version){ this.version = version; }, remote:{ // Empty }, web:{ ui:{ controls:{ ...
תגובה אחת

How to set absolutePath using CSS expression for AlphaImageLoader (IE) *.png files

25 בפברואר 2008

TIP: "Set absolutePath using CSS expression for AlphaImageLoader (IE) *.png files".So what you can do to write absolute path in CSS files not like "HARD CODE" Here attached below examples CSS syntax. Before: _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/ machine/app_resources/ui/images/wrapper.png',sizingMethod='image'); After: _filter: expression("progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ absolutePath +"wrapper.png', sizingMethod='image')"); DESCRIPTION: The absolutePath - is javascript variable get this value "/machine/app_resources/ui/images/" and declared between HTML <head></head> block of page.NOTE: JavaScript variable must to be declared before including CSS files see the next example. <head>     <title>...</title>        <script type="text/javascript">        var absolutePath = "/machine/app_resources/ui/images/";        </script>        <link href="<%=ResolveUrl("~/") %> Read more about CSS Expression
תגיות: , ,
אין תגובות

ASP.NET 2 Custom Control for Google "UrchinTracker" as sample

21 בפברואר 2008

Simple example to create ASP.NET 2 Custom Control for Google "UrchinTracker" 1) Edit Web.config file add the next code between <system.web> <pages>     <controls>          <add namespace="Render.Web.UI.CustomControls" assembly="App_Code" tagPrefix="render" />     </controls></pages> 2) Create a new class file *.cs in App_Code/Render/Web/UI/CustomControls using System; using System.Web.UI; using System.Text; using System.Web.UI.WebControls;   /// <summary> /// Summary description for UrchinTracker /// </summary> namespace Render.Web.UI.CustomControls {       // Inherit Control     public class UrchinTracker : Control {           #region Fields         private string userAccount;         #endregion           #region Properties         public string UserAccount {             get { return userAccount; }             set { userAccount = value; }         }         #endregion           #region Constructor         public UrchinTracker() {             //             // TODO: Add constructor logic here             //         }         #endregion           public string GetOutput() {             StringBuilder output = new StringBuilder();            ...
אין תגובות

How to write JavaScript right?

19 בפברואר 2008

Ok guy's.We are having 3 ways (Prototype, Object and Closure) to write JavaScript but I like at once strong and beautiful "Prototype". Here attached example for Prototype way (with Namespaces, Classes and Methods as in C#). // Namespace Corefunction core() { return this.constructor('release 1.2.3'); }core.prototype = {    version:'',    constructor: function(version) { this.version = version },    remote:{        access:{            get:function(url, data, callback) {                // Do            }        }    },    web:{        ui:{            init:function() {},            controls:{                message:{                    show: function(title, context) {                        // Do                     }                }            }        }    },    user:{        info:{            get: function(userName) {                var property = ;                property = this.prototype.remote.access.get('http://',{rq:userName}, function(){ });                return property;            }        },       ...
3 תגובות