<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Fundamental Provocation &#187; Javascript</title> <atom:link href="http://www.ajaymatharu.com/tag/javascript/feed/" rel="self" type="application/rss+xml" /><link>http://www.ajaymatharu.com</link> <description>Blog by Ajay Matharu</description> <lastBuildDate>Sun, 06 Nov 2011 15:09:39 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Validating html tags in textbox &#8211; Cross site scripting</title><link>http://www.ajaymatharu.com/validating-html-tags-in-textbox-cross-site-scripting/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=validating-html-tags-in-textbox-cross-site-scripting</link> <comments>http://www.ajaymatharu.com/validating-html-tags-in-textbox-cross-site-scripting/#comments</comments> <pubDate>Wed, 17 Mar 2010 22:26:26 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Cross page scripting issue]]></category> <category><![CDATA[validate HTML]]></category> <category><![CDATA[validate html in textbox]]></category> <category><![CDATA[validate html tags]]></category> <category><![CDATA[validate HTML tags in input]]></category> <category><![CDATA[validate html tags in textbox]]></category> <category><![CDATA[validation]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1169</guid> <description><![CDATA[Following is the code to validate any textbox or input text against html tags. //source and args are required if calling from custom validator in asp.net else its not required function htmlValidation(source,args) { var re = /(]+)>)/gi; if (document.getElementById(’’).value.match(re)) { document.getElementById(’’).value = “”; alert(’Invalid content’); //args.IsValid = false; // you can use this if you [...]]]></description> <content:encoded><![CDATA[<p>Following is the code to validate any textbox or input text against html tags.</p><pre name="code" class="js">
//source and args are required if calling from custom validator in asp.net else its not required
function htmlValidation(source,args)
{
var re = /(<([^>]+)>)/gi;

if (document.getElementById(’<%=TextBox2.ClientID%>’).value.match(re)) {
document.getElementById(’<%=TextBox2.ClientID%>’).value = “”;
alert(’Invalid content’);
//args.IsValid = false; // you can use this if you are calling this from custom validator in asp.net
return false;
}
if (document.getElementById("textboxid").value.match(re)) {
document.getElementById("textboxid").value = “”;
alert(’Invalid content’);
return false;
}
return true;
}
</pre>]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/validating-html-tags-in-textbox-cross-site-scripting/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Javascript libraries</title><link>http://www.ajaymatharu.com/javascript-libraries/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=javascript-libraries</link> <comments>http://www.ajaymatharu.com/javascript-libraries/#comments</comments> <pubDate>Sat, 22 Aug 2009 04:20:38 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[Development]]></category> <category><![CDATA[Featured Articles]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Javascript frameworks]]></category> <category><![CDATA[Javascript libraries]]></category> <category><![CDATA[Performance]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1399</guid> <description><![CDATA[Lots of Javascript libraries and frameworks have come up. It has been made to make the life of developer really easy. Here is the list of all available Javascript frameworks, http://www.javascriptlibraries.com/ But, I have got a very big question to ask, &#8220;are these framework making the life of Developer really easy?&#8221; With the increase in [...]]]></description> <content:encoded><![CDATA[<p>Lots of Javascript libraries and frameworks have come up. It has been made to make the life of developer really easy. Here is the list of all available Javascript frameworks, http://www.javascriptlibraries.com/</p><p>But, I have got a very big question to ask, <em><strong>&#8220;are these framework making the life of Developer really easy?&#8221;</strong></em></p><p>With the increase in the speed and number of the javascript framework, its getting difficult for the developers to decide which framework is to be used where.</p><p>Here, http://mootools.net/slickspeed/, you can test the speed/validity selector test for some of the major frameworks available.</p><p>You can get comparison matrix for most of the Javascript framework here,</p><p>http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks</p><p>The following guidelines might help you to decide which framework you should go for,</p><h3>What are your project requirements?</h3><p>The first and most important question you need to ask yourself is <em>what are your project requirements</em>? Is this a Web site or application that requires AJAX, robust support for handling events, or how about a library of effects? How much functionality do you need out-of-the-box, and what level of experience will be required by other programmers and designers to support this framework? If you have few requirements, you could find success with an extremely lightweight, modular library. Also you need check if your project requires effects, AJAX, graphics, tools etc</p><h3>Does the framework supports all the browsers?</h3><p>Once you know your audience, and your project requirements, you need to consider whether or not your JavaScript framework supports all the needed browsers. Most frameworks do, but there are often some exceptions in the fine print — typically with Safari on the Mac. If you are building an internal Web application for an Intranet, you might only be required to support a limited set of browsers.</p><h3>How mature is the framework?</h3><p>More than anything, the maturity of a framework demonstrates a commitment to longevity, as well as a solid foundation. A mature framework will no longer be in beta, and will have been through a full release cycle. There should be a growing, if not thriving community, and depending on the open-source license, a mature framework might also support a Subversion or CVS version repository. Any bug fixes can be rolled into a build without a public release, which is a huge plus.</p><h3>How often are updates publicly released?</h3><p>If you find that the community questions or complains about the release cycle, then that could be a warning sign. Long delays and bloated releases are also a sure sign that you will not enjoy supporting the framework on future projects. Alternatively, too many public releases could indicate instability, or a lack of focus.</p><h3>How friendly is the documentation?</h3><p>A major differentiators between JavaScript frameworks today is documentation. This not only includes official documentation for the API, but also includes books, tutorials, and blogs. The worst documentation is the sort that is only focused on syntax. Look for a framework that includes examples with each method and property, and that is updated to meet the needs of the community. Documentation is simple to research, and it can be a lifesaver when dealing with tight deadlines.</p><h3>Is there an active community?</h3><p>An active community does not guarantee a quality framework, but it does help a framework evolve. The character of the community is also an excellent gage of the type of help you might receive in the future when caught in a bind. Are there forums, or a Google Group? Are experienced users willing and able to lend a helping hand, or will they send you elsewhere for assistance? Are developers creating extensions, or contributing to the core framework? All of these are important questions.</p><h3>Are benchmark tests performed regularly?</h3><p>Benchmark tests are often questionable when determining the quality of workmanship put into a framework, but they do demonstrate a developer’s willingness to adopt some quality assurance best practices. Even a modest gain in speed, or a decrease in download size during a release cycle can be seen as a positive improvement.</p><h3>How extensible is the framework?</h3><p>Extensibility is typically a requirement of experienced programmers, and is rarely a request of designers. Plugin support is definitely a plus for any JavaScript framework, but developers usually just want to know — <em>how difficult will it be to troubleshoot the core library</em>? Layers of functionality provided by an active community do give a framework uniqueness, but this is a beneficial byproduct, and not often a necessity.</p><h3>Do you like the API style?</h3><p>This is an important, but complicated question that is answered for most developers only after using several JavaScript frameworks on numerous projects. Complaints about frameworks like Yahoo! UI are generally in regards to the style with which the API has been designed. Terseness, as well as chainability, are two very important features that should not be overlooked. Remember, you can grow irritated quickly because of cumbersome implementation details.</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/javascript-libraries/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using JSON to send objects across pages</title><link>http://www.ajaymatharu.com/using-json-to-send-objects-across-pages/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-json-to-send-objects-across-pages</link> <comments>http://www.ajaymatharu.com/using-json-to-send-objects-across-pages/#comments</comments> <pubDate>Wed, 15 Jul 2009 15:20:17 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[Arraylist]]></category> <category><![CDATA[C#]]></category> <category><![CDATA[DeSerialize]]></category> <category><![CDATA[HttpRequest]]></category> <category><![CDATA[JSON]]></category> <category><![CDATA[Microsoft .Net]]></category> <category><![CDATA[Request Object]]></category> <category><![CDATA[Serialize]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1489</guid> <description><![CDATA[Recently our team came across a situation where our job was to retrieve ArrayList in a page requested by flex application using HttpService.Which are accessed using Request[keyName] Request objects always returns data in string format, so there was no point in trying that solution, so we were looking for some reliable and optimal solution. Googling [...]]]></description> <content:encoded><![CDATA[<p>Recently our team came across a situation where our job was to retrieve ArrayList in a page requested by flex application using HttpService.Which are accessed using <strong>Request[keyName]<br /> </strong><br /> Request objects always returns data in string format, so there was no point in trying that solution, so we were looking for some reliable and optimal solution. Googling around I came across JSON (Javascript Object Notation).JSON can be used in various languages, you can find the list of langauges and the resources requied to use <a href="http://json.org/">JSON</a> over here.</p><p>JSON allows us to serialize a object and send across a page in string format.All we need to do is to perform Deserialization on the requested page.</p><p>This is the sample code which demonstrates the use of JSON to send arraylist to another page.</p><p>The code below contains 2 arraylist which need to be send on another page.The arraylist are serialized and sent to different page with the help of querystring.</p><pre name="code" class="c#">
ArrayList list = new ArrayList();
ArrayList list1 = new ArrayList();
list1.Add("one-one");
list1.Add("one-two");
list1.Add("one-three");
list1.Add("one-four");
list.Add(list1);
list.Add("two");
list.Add("three");
string arrayList = JavaScriptConvert.SerializeObject(list);
Response.Redirect("Process.aspx?list="+arrayList);
</pre><p>The code below Deserialize and typecast the object to JavaScriptArray.</p><pre name="code" class="c#">
string arrayList = Request["list"];
JavaScriptArray list = (JavaScriptArray)JavaScriptConvert.DeserializeObject(arrayList);
</pre><p>You can download sample code from <a href="http://www.box.net/shared/g0nahe7979">here</a>.</p><p>Enjoy Coding <img src='http://www.ajaymatharu.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/using-json-to-send-objects-across-pages/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Disable Cut, Copy &amp; Paste in ASP.Net textbox</title><link>http://www.ajaymatharu.com/disable-cut-copy-paste-in-asp-net-textbox/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=disable-cut-copy-paste-in-asp-net-textbox</link> <comments>http://www.ajaymatharu.com/disable-cut-copy-paste-in-asp-net-textbox/#comments</comments> <pubDate>Wed, 08 Jul 2009 18:57:44 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[.Net]]></category> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[HTML]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Tip of Week]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[asp textbox]]></category> <category><![CDATA[ASP.Net textbox]]></category> <category><![CDATA[Copy]]></category> <category><![CDATA[copy paste]]></category> <category><![CDATA[Cut]]></category> <category><![CDATA[Disable Cut]]></category> <category><![CDATA[Disable Cut Copy Paste]]></category> <category><![CDATA[Paste]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1473</guid> <description><![CDATA[You can disable cut, copy &#38; paste in ASP.Net textbox in very simple way, here is how you can disable the cut, copy, paste, &#60;asp:TextBox ID=”TextBox1″ runat=”server” oncopy=”return false” onpaste=”return false” oncut=”return false”&#62;&#60;/asp:TextBox&#62;]]></description> <content:encoded><![CDATA[<p>You can disable cut, copy &amp; paste in ASP.Net textbox in very simple way,</p><p>here is how you can disable the cut, copy, paste,</p><pre class="html" name="code">&lt;asp:TextBox ID=”TextBox1″ runat=”server” oncopy=”return false” onpaste=”return false” oncut=”return false”&gt;&lt;/asp:TextBox&gt;</pre>]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/disable-cut-copy-paste-in-asp-net-textbox/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>JQuery TOOLS &#8211; New Javascript Library, can it compete JQuery UI?</title><link>http://www.ajaymatharu.com/jquery-tools-new-javascript-library-can-it-compete-jquery-ui/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-tools-new-javascript-library-can-it-compete-jquery-ui</link> <comments>http://www.ajaymatharu.com/jquery-tools-new-javascript-library-can-it-compete-jquery-ui/#comments</comments> <pubDate>Sun, 28 Jun 2009 07:39:57 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[Design]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[JQuery]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Creativity]]></category> <category><![CDATA[Javascript Library]]></category> <category><![CDATA[Jquery]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1392</guid> <description><![CDATA[These days almost every site uses JQuery. It makes your life so easy. There is this another Javascript library called JQuery Tools that is coming up as competitor for JQuery UI. Here is the link to the JQuery Tool http://flowplayer.org/tools/demos/index.html. But the question, for which I am searching the answer is, Can JQuery Tools really [...]]]></description> <content:encoded><![CDATA[<p>These days almost every site uses JQuery. It makes your life so easy. There is this another Javascript library called JQuery Tools that is coming up as competitor for JQuery UI. Here is the link to the JQuery Tool http://flowplayer.org/tools/demos/index.html.</p><p>But the question, for which I am searching the answer is,<br /> Can JQuery Tools really compete with JQuery UI? And who would answer this question better then you guys.</p><p>So what you guys think, JQuery Tools Vs JQuery UI, who wins?</p><p>I look forward for hearing your thoughts on this. As this may help others to decide what should they go from either of these</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/jquery-tools-new-javascript-library-can-it-compete-jquery-ui/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>JQuery in Visual Studio</title><link>http://www.ajaymatharu.com/jquery-in-visual-studio/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=jquery-in-visual-studio</link> <comments>http://www.ajaymatharu.com/jquery-in-visual-studio/#comments</comments> <pubDate>Sun, 17 May 2009 18:00:45 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[.Net]]></category> <category><![CDATA[CSS]]></category> <category><![CDATA[Developer]]></category> <category><![CDATA[Development]]></category> <category><![CDATA[Dot Net]]></category> <category><![CDATA[Jquery]]></category><guid isPermaLink="false">http://ajaymatharu.wordpress.com/?p=279</guid> <description><![CDATA[A big part of the appeal of jQuery is that it allows you to elegantly (and efficiently) find and manipulate HTML elements with minimum lines of code.  jQuery supports this via a nice &#8220;selector&#8221; API that allows developers to query for HTML elements, and then apply &#8220;commands&#8221; to them.  One of the characteristics of jQuery [...]]]></description> <content:encoded><![CDATA[<p>A big part of the appeal of jQuery is that it allows you to elegantly (and efficiently) find and manipulate HTML elements with minimum lines of code.  jQuery supports this via a nice &#8220;selector&#8221; API that allows developers to query for HTML elements, and then apply &#8220;commands&#8221; to them.  One of the characteristics of jQuery commands is that they can be &#8220;chained&#8221; together &#8211; so that the result of one command can feed into another.  jQuery also includes a built-in set of animation APIs that can be used as commands.  The combination allows you to do some really cool things with only a few keystrokes.</p><p>For example, the below JavaScript uses jQuery to find all &lt;div&gt; elements within a page that have a CSS class of &#8220;product&#8221;, and then animate them to slowly disappear:</p><pre class="javascript">$("div.product").slideUp('slow').addClass("removed");</pre><p>As another example, the JavaScript below uses jQuery to find a specific &lt;table&gt; on the page with an id of &#8220;datagrid1&#8243;, then retrieves every other &lt;tr&gt; row within the datagrid, and sets those &lt;tr&gt; elements to have a CSS class of &#8220;even&#8221; &#8211; which could be used to alternate the background color of each row:</p><pre class="javascript">$("#datagrid1 tr:nth-child(even)").addClass("even");</pre><p>The jQuery library also works well on the same page with ASP.NET AJAX and the ASP.NET AJAX Control Toolkit.</p><p>Visual Studio figures out external script references, such as to JQuery, by following special reference comments it finds at the top of .js files:</p><pre>/// &lt;reference path="jquery-1.2.3.js" /&gt;</pre><p>You can download the JQuery from <a href="http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js&amp;downloadBtn=%3CSPAN%3EDownload%3C%2FSPAN%3E" target="_blank">here</a>. You can get more details on JQuery from <a href="http://jquery.com/api/">http://jquery.com/</a> .</p><p>For intellisense support for JQuery you need to install this <a href="https://connect.microsoft.com/VisualStudio/Downloads/DownloadDetails.aspx?DownloadID=10826" target="_blank">Hotfix</a>.</p><p>Comment for javascript is written inside for intellisense support. JavaScript has the interesting feature that calling toString on a function returns the code of this function including the comments and thus the doc comments. Here&#8217;s a similar example in JavaScript where the documentation is written inside of a class constructor:</p><p><a href="http://ajaymatharu.files.wordpress.com/2008/10/jsintellisense.png"><img class="aligncenter size-full wp-image-280" title="jsintellisense" src="http://ajaymatharu.files.wordpress.com/2008/10/jsintellisense.png" alt="" width="450" height="59" /></a></p><p>Another difference with C# or VB.NET is that property and event accessors are two different entities in JavaScript. For this reason, to choose where the documentation should be for those members. Properties should be documented in the getter and events in the &#8220;adder&#8221; for this reason:</p><p><a href="http://ajaymatharu.files.wordpress.com/2008/10/js.png"><img class="aligncenter size-full wp-image-281" title="js" src="http://ajaymatharu.files.wordpress.com/2008/10/js.png" alt="" width="450" height="133" /></a></p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/jquery-in-visual-studio/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Launch application from javascript</title><link>http://www.ajaymatharu.com/launch-application-from-javascript/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=launch-application-from-javascript</link> <comments>http://www.ajaymatharu.com/launch-application-from-javascript/#comments</comments> <pubDate>Tue, 12 May 2009 11:02:28 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[HTML]]></category> <category><![CDATA[Internet Explorer]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Web]]></category> <category><![CDATA[Application from web]]></category> <category><![CDATA[Browsers]]></category> <category><![CDATA[Firefox]]></category> <category><![CDATA[Internet]]></category> <category><![CDATA[Launch]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1208</guid> <description><![CDATA[Following is the code that will launch a command prompt on the client machine when you click on the link. This code runs only on Internet Explorer. I&#8217;ll shortly write code for Firefox and other browsers as well. So stay tuned. This is the javascript code that will launch the application To call this code [...]]]></description> <content:encoded><![CDATA[<p>Following is the code that will launch a command prompt on the client machine when you click on the link. This code runs only on Internet Explorer. I&#8217;ll shortly write code for Firefox  and other browsers as well. So stay tuned.</p><p>This is the javascript code that will launch the application</p><pre class="jscript" name="code">

</pre><p>To call this code in your HTML use,</p><pre class="html" name="code">
<a href="javascript:StartThis('cmd.exe')">Start explorer</a>
</pre>]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/launch-application-from-javascript/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>CSS Properties To JavaScript Reference Conversion</title><link>http://www.ajaymatharu.com/css-properties-to-javascript-reference-conversion/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=css-properties-to-javascript-reference-conversion</link> <comments>http://www.ajaymatharu.com/css-properties-to-javascript-reference-conversion/#comments</comments> <pubDate>Thu, 09 Apr 2009 05:17:34 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[CSS]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Web]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=1132</guid> <description><![CDATA[Usage: document.getElementById(div_id).style.JS_property_reference = &#8220;new_CSS_property_value&#8221;; CSS Property JavaScript Reference background background background-attachment backgroundAttachment background-color backgroundColor background-image backgroundImage background-position backgroundPosition background-repeat backgroundRepeat border border border-bottom borderBottom border-bottom-color borderBottomColor border-bottom-style borderBottomStyle border-bottom-width borderBottomWidth border-color borderColor border-left borderLeft border-left-color borderLeftColor border-left-style borderLeftStyle border-left-width borderLeftWidth border-right borderRight border-right-color borderRightColor border-right-style borderRightStyle border-right-width borderRightWidth border-style borderStyle border-top borderTop border-top-color borderTopColor border-top-style [...]]]></description> <content:encoded><![CDATA[<p><span style="font-size: large;"><strong>Usage:</strong></span></p><p>document.getElementById(<em>div_id</em>).style.<em>JS_property_reference</em> = <em>&#8220;new_CSS_property_value&#8221;</em>;</p><table border="2" cellspacing="0" cellpadding="5" width="70%" align="center"><tbody><tr><th width="50%" align="center">CSS Property</th><th width="50%" align="center">JavaScript Reference</th></tr><tr><td width="50%" align="center">background</td><td width="50%" align="center">background</td></tr><tr><td width="50%" align="center">background-attachment</td><td width="50%" align="center">backgroundAttachment</td></tr><tr><td width="50%" align="center">background-color</td><td width="50%" align="center">backgroundColor</td></tr><tr><td width="50%" align="center">background-image</td><td width="50%" align="center">backgroundImage</td></tr><tr><td width="50%" align="center">background-position</td><td width="50%" align="center">backgroundPosition</td></tr><tr><td width="50%" align="center">background-repeat</td><td width="50%" align="center">backgroundRepeat</td></tr><tr><td width="50%" align="center">border</td><td width="50%" align="center">border</td></tr><tr><td width="50%" align="center">border-bottom</td><td width="50%" align="center">borderBottom</td></tr><tr><td width="50%" align="center">border-bottom-color</td><td width="50%" align="center">borderBottomColor</td></tr><tr><td width="50%" align="center">border-bottom-style</td><td width="50%" align="center">borderBottomStyle</td></tr><tr><td width="50%" align="center">border-bottom-width</td><td width="50%" align="center">borderBottomWidth</td></tr><tr><td width="50%" align="center">border-color</td><td width="50%" align="center">borderColor</td></tr><tr><td width="50%" align="center">border-left</td><td width="50%" align="center">borderLeft</td></tr><tr><td width="50%" align="center">border-left-color</td><td width="50%" align="center">borderLeftColor</td></tr><tr><td width="50%" align="center">border-left-style</td><td width="50%" align="center">borderLeftStyle</td></tr><tr><td width="50%" align="center">border-left-width</td><td width="50%" align="center">borderLeftWidth</td></tr><tr><td width="50%" align="center">border-right</td><td width="50%" align="center">borderRight</td></tr><tr><td width="50%" align="center">border-right-color</td><td width="50%" align="center">borderRightColor</td></tr><tr><td width="50%" align="center">border-right-style</td><td width="50%" align="center">borderRightStyle</td></tr><tr><td width="50%" align="center">border-right-width</td><td width="50%" align="center">borderRightWidth</td></tr><tr><td width="50%" align="center">border-style</td><td width="50%" align="center">borderStyle</td></tr><tr><td width="50%" align="center">border-top</td><td width="50%" align="center">borderTop</td></tr><tr><td width="50%" align="center">border-top-color</td><td width="50%" align="center">borderTopColor</td></tr><tr><td width="50%" align="center">border-top-style</td><td width="50%" align="center">borderTopStyle</td></tr><tr><td width="50%" align="center">border-top-width</td><td width="50%" align="center">borderTopWidth</td></tr><tr><td width="50%" align="center">border-width</td><td width="50%" align="center">borderWidth</td></tr><tr><td width="50%" align="center">clear</td><td width="50%" align="center">clear</td></tr><tr><td width="50%" align="center">clip</td><td width="50%" align="center">clip</td></tr><tr><td width="50%" align="center">color</td><td width="50%" align="center">color</td></tr><tr><td width="50%" align="center">cursor</td><td width="50%" align="center">cursor</td></tr><tr><td width="50%" align="center">display</td><td width="50%" align="center">display</td></tr><tr><td width="50%" align="center">filter</td><td width="50%" align="center">filter</td></tr><tr><td width="50%" align="center">font</td><td width="50%" align="center">font</td></tr><tr><td width="50%" align="center">font-family</td><td width="50%" align="center">fontFamily</td></tr><tr><td width="50%" align="center">font-size</td><td width="50%" align="center">fontSize</td></tr><tr><td width="50%" align="center">font-variant</td><td width="50%" align="center">fontVariant</td></tr><tr><td width="50%" align="center">font-weight</td><td width="50%" align="center">fontWeight</td></tr><tr><td width="50%" align="center">height</td><td width="50%" align="center">height</td></tr><tr><td width="50%" align="center">left</td><td width="50%" align="center">left</td></tr><tr><td width="50%" align="center">letter-spacing</td><td width="50%" align="center">letterSpacing</td></tr><tr><td width="50%" align="center">line-height</td><td width="50%" align="center">lineHeight</td></tr><tr><td width="50%" align="center">list-style</td><td width="50%" align="center">listStyle</td></tr><tr><td width="50%" align="center">list-style-image</td><td width="50%" align="center">listStyleImage</td></tr><tr><td width="50%" align="center">list-style-position</td><td width="50%" align="center">listStylePosition</td></tr><tr><td width="50%" align="center">list-style-type</td><td width="50%" align="center">listStyleType</td></tr><tr><td width="50%" align="center">margin</td><td width="50%" align="center">margin</td></tr><tr><td width="50%" align="center">margin-bottom</td><td width="50%" align="center">marginBottom</td></tr><tr><td width="50%" align="center">margin-left</td><td width="50%" align="center">marginLeft</td></tr><tr><td width="50%" align="center">margin-right</td><td width="50%" align="center">marginRight</td></tr><tr><td width="50%" align="center">margin-top</td><td width="50%" align="center">marginTop</td></tr><tr><td width="50%" align="center">overflow</td><td width="50%" align="center">overflow</td></tr><tr><td width="50%" align="center">padding</td><td width="50%" align="center">padding</td></tr><tr><td width="50%" align="center">padding-bottom</td><td width="50%" align="center">paddingBottom</td></tr><tr><td width="50%" align="center">padding-left</td><td width="50%" align="center">paddingLeft</td></tr><tr><td width="50%" align="center">padding-right</td><td width="50%" align="center">paddingRight</td></tr><tr><td width="50%" align="center">padding-top</td><td width="50%" align="center">paddingTop</td></tr><tr><td width="50%" align="center">page-break-after</td><td width="50%" align="center">pageBreakAfter</td></tr><tr><td width="50%" align="center">page-break-before</td><td width="50%" align="center">pageBreakBefore</td></tr><tr><td width="50%" align="center">position</td><td width="50%" align="center">position</td></tr><tr><td width="50%" align="center">float</td><td width="50%" align="center">styleFloat</td></tr><tr><td width="50%" align="center">text-align</td><td width="50%" align="center">textAlign</td></tr><tr><td width="50%" align="center">text-decoration</td><td width="50%" align="center">textDecoration</td></tr><tr><td width="50%" align="center">text-decoration: blink</td><td width="50%" align="center">textDecorationBlink</td></tr><tr><td width="50%" align="center">text-decoration: line-through</td><td width="50%" align="center">textDecorationLineThrough</td></tr><tr><td width="50%" align="center">text-decoration: none</td><td width="50%" align="center">textDecorationNone</td></tr><tr><td width="50%" align="center">text-decoration: overline</td><td width="50%" align="center">textDecorationOverline</td></tr><tr><td width="50%" align="center">text-decoration: underline</td><td width="50%" align="center">textDecorationUnderline</td></tr><tr><td width="50%" align="center">text-indent</td><td width="50%" align="center">textIndent</td></tr><tr><td width="50%" align="center">text-transform</td><td width="50%" align="center">textTransform</td></tr><tr><td width="50%" align="center">top</td><td width="50%" align="center">top</td></tr><tr><td width="50%" align="center">vertical-align</td><td width="50%" align="center">verticalAlign</td></tr><tr><td width="50%" align="center">visibility</td><td width="50%" align="center">visibility</td></tr><tr><td width="50%" align="center">width</td><td width="50%" align="center">width</td></tr><tr><td width="50%" align="center">z-index</td><td width="50%" align="center">zIndex</td></tr></tbody></table> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/css-properties-to-javascript-reference-conversion/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Maxlength of multiline textbox in ASP.Net</title><link>http://www.ajaymatharu.com/maxlength-of-multiline-textbox-in-aspnet/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=maxlength-of-multiline-textbox-in-aspnet</link> <comments>http://www.ajaymatharu.com/maxlength-of-multiline-textbox-in-aspnet/#comments</comments> <pubDate>Wed, 18 Feb 2009 05:03:53 +0000</pubDate> <dc:creator>Ajay Matharu</dc:creator> <category><![CDATA[ASP.Net]]></category> <category><![CDATA[Technical]]></category> <category><![CDATA[Visual Studio]]></category> <category><![CDATA[.Net]]></category> <category><![CDATA[Javascript]]></category> <category><![CDATA[Microsoft Visual Studio]]></category> <category><![CDATA[Mulitine textbox]]></category> <category><![CDATA[vs.net]]></category><guid isPermaLink="false">http://www.ajaymatharu.com/?p=966</guid> <description><![CDATA[Many times you need to restrict the number of character&#8217;s in multi-line textbox in asp.net. However the maxlength property does not helps in this case what you can do is use this javascript code to restrict the number of input characters in multiline textbox. &#60;script language=&#8221;javascript&#8221;&#62; function textboxMultilineMaxNumber(txt, maxLen) { try { if (txt.value.length &#62; [...]]]></description> <content:encoded><![CDATA[<p>Many times you need to restrict the number of character&#8217;s in multi-line textbox in asp.net. However the maxlength property does not helps in this case what you can do is use this javascript code to restrict the number of input characters in multiline textbox.</p><p>&lt;script language=&#8221;javascript&#8221;&gt;<br /> function textboxMultilineMaxNumber(txt, maxLen) {<br /> try {<br /> if (txt.value.length &gt; (maxLen &#8211; 1)) return false;<br /> } catch (e) {<br /> }<br /> }<br /> &lt;/script&gt;</p><p>use javascript like this,</p><p>&lt;asp:textbox id=&#8221;TextBox1&#8243; runat=&#8221;server&#8221; Width=&#8221;232px&#8221; TextMode=&#8221;MultiLine&#8221; Height=&#8221;48px&#8221; style=&#8221;Z-INDEX: 104; LEFT: 136px; TOP: 336px&#8221;<br /> onkeypress=&#8221;return textboxMultilineMaxNumber(this,10)&#8221;&gt;&lt;/asp:textbox&gt;</p> ]]></content:encoded> <wfw:commentRss>http://www.ajaymatharu.com/maxlength-of-multiline-textbox-in-aspnet/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
