<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6718406939865222936</id><updated>2026-04-08T09:16:09.289+02:00</updated><category term="css"/><category term="asp"/><category term="JavaScript"/><category term="VBScript"/><category term="jQuery"/><category term="sql server"/><category term="sql query"/><category term="html"/><category term="offtopic"/><category term="css3"/><category term="web design"/><category term="web development"/><category term="the web thought"/><category term="plug-in"/><category term="HTML5"/><category term="blogger"/><category term="functions"/><category term="compatibility"/><category term="form"/><category term="SQL Server Management Studio"/><category term="Scripting.FileSystemObject"/><category term="ajax"/><category term="border-radius"/><category term="exchange server"/><category term="ms access"/><category term="DOM"/><category term="background image"/><category term="blog rank"/><category term="box-shadow"/><category term="font"/><category term="html tables"/><category term="image"/><category term="rss feed"/><category term="jQuery UI"/><category term="menu"/><category term="stored procedure"/><category term="web application"/><category term="XML"/><category term="conditional statement"/><category term="document.getElementById"/><category term="form validation"/><category term="ranking"/><category term="screen resolutions"/><category term="selectors"/><category term="statistics"/><category term="CSS3 pie"/><category term="FPDF"/><category term="Google Analytics"/><category term="Google Webmaster Central"/><category term="IIS"/><category term="T-SQL"/><category term="URL"/><category term="background"/><category term="background-gradient"/><category term="custom font"/><category term="date"/><category term="email"/><category term="footer"/><category term="header"/><category term="iPhone"/><category term="ie8"/><category term="internet explorer"/><category term="isdate"/><category term="left"/><category term="mobile devices"/><category term="pdf"/><category term="positioning"/><category term="print"/><category term="programming"/><category term="quotes"/><category term="table"/><category term="validation"/><category term="CharSet"/><category term="Christmas"/><category term="DSN"/><category term="ExMerge"/><category term="IN"/><category term="Linked Servers"/><category term="RegEx"/><category term="SSMS"/><category term="absolute"/><category term="apostrophe"/><category term="array"/><category term="blog comments"/><category term="button"/><category term="cookies"/><category term="css gradient"/><category term="database backup"/><category term="dynamic table"/><category term="firefox"/><category term="golden ratio"/><category term="google blogger ranking"/><category term="google+"/><category term="ie6"/><category term="ie7"/><category term="keyword"/><category term="mysql"/><category term="popup"/><category term="progress indicator"/><category term="progressbar"/><category term="random quotes"/><category term="ranking methods"/><category term="regular expression"/><category term="replace"/><category term="right"/><category term="rotate"/><category term="round corner"/><category term="server-side include"/><category term="sitemap"/><category term="special characters"/><category term="submenu"/><category term="textarea"/><category term="tooltips"/><category term="transform"/><category term="tutorial"/><category term="video"/><category term="web developer"/><category term="web safe area"/><category term="3d"/><category term="AcuODBC"/><category term="Acucobol"/><category term="AddHeader"/><category term="FileExists"/><category term="Google Api"/><category term="JSON"/><category term="MOD"/><category term="MOD function"/><category term="Mozilla Developer Network"/><category term="OR"/><category term="Oracle"/><category term="RFC822 date"/><category term="SQL Scheduler"/><category term="Server.MapPath"/><category term="URL parameters"/><category term="adobe"/><category term="adodb.command"/><category term="alternate colours"/><category term="ampersand"/><category term="analog clock"/><category term="analogue clock"/><category term="animated gif"/><category term="apple"/><category term="at-import"/><category term="at-media"/><category term="attribute"/><category term="autocomplete"/><category term="background-origin"/><category term="background-size"/><category term="blogger buzz"/><category term="blogs"/><category term="canvas"/><category term="chm"/><category term="class"/><category term="coding"/><category term="collection"/><category term="colours"/><category term="columns"/><category term="creating an help file"/><category term="custom feed"/><category term="data type"/><category term="database administrator"/><category term="dateadd"/><category term="datediff"/><category term="declaration"/><category term="doctype"/><category term="document.getElementsByClassName"/><category term="dynamic columns"/><category term="dynamic variables"/><category term="embed videos"/><category term="entity codes"/><category term="event"/><category term="execute"/><category term="extension"/><category term="fadeIn"/><category term="fadeOut"/><category term="file upload"/><category term="final user"/><category term="firefox 16"/><category term="fit screenauto"/><category term="fixed"/><category term="float"/><category term="fluid"/><category term="get"/><category term="handheld"/><category term="help"/><category term="hide"/><category term="id"/><category term="if"/><category term="index"/><category term="input type"/><category term="insert"/><category term="instr"/><category term="interval"/><category term="len"/><category term="lightbox"/><category term="link"/><category term="loop"/><category term="manipulate"/><category term="manipulate property"/><category term="media queries"/><category term="method"/><category term="mistakes"/><category term="modernizr"/><category term="ms excel"/><category term="multicell"/><category term="nest"/><category term="newid()"/><category term="next"/><category term="notification"/><category term="online help"/><category term="openquery"/><category term="operators"/><category term="overlapping"/><category term="overlay"/><category term="owa"/><category term="padding"/><category term="pdfforge"/><category term="percentage"/><category term="php"/><category term="prefixes"/><category term="preloaders"/><category term="pseudo elements"/><category term="query"/><category term="ranking technics"/><category term="relational database"/><category term="resize"/><category term="response.flush"/><category term="response.isclientconnected"/><category term="screen.width"/><category term="scroll"/><category term="scroll to the top of page"/><category term="security"/><category term="session"/><category term="shapes"/><category term="slideToggle"/><category term="slider"/><category term="substring"/><category term="syntax"/><category term="syntax error"/><category term="sys.tables"/><category term="tabs"/><category term="terminology"/><category term="unique identifier"/><category term="update"/><category term="value"/><category term="variables"/><category term="window effect"/><category term="writing an help file"/><category term="z-index"/><category term="zoom"/><category term="%"/><category term="-prefix-free"/><category term=".attr()"/><category term=".html()"/><category term=".js"/><category term=".test"/><category term=".text()"/><category term=".val()"/><category term="2011"/><category term="404"/><category term="56K"/><category term="7"/><category term="AAC"/><category term="AND"/><category term="ActiveSync"/><category term="BlockUI"/><category term="BuildPath"/><category term="CMS"/><category term="ChooseContent"/><category term="CodePage"/><category term="ContentRotator"/><category term="CursorType"/><category term="DBA"/><category term="DOM tree"/><category term="DataTables"/><category term="GUID"/><category term="GetAllContent"/><category term="GetDrive"/><category term="GetExtensionName"/><category term="GetFile"/><category term="GetFolder"/><category term="Google Web Fonts"/><category term="Google libraries api"/><category term="H264"/><category term="HTML Dog"/><category term="HTML compressor"/><category term="IDENTITY"/><category term="IIS7"/><category term="InStrRev"/><category term="LDAP"/><category term="LESS"/><category term="LockType"/><category term="MSWC.BrowserType"/><category term="Mozilla"/><category term="OMA"/><category term="PDF T-Maker"/><category term="PHI"/><category term="Personal Websites"/><category term="Python"/><category term="RPC over HTTP"/><category term="RSG"/><category term="SEO"/><category term="SQL Server utilities"/><category term="SSMS Tools Pack"/><category term="ServerXMLHTTP"/><category term="Shalom Help Maker"/><category term="Steve Jobs"/><category term="Theora"/><category term="URL Rewrite"/><category term="Vorbis"/><category term="Webkit"/><category term="Windows Live Writer"/><category term="XML response"/><category term="XMLHttpRequest"/><category term="accordion"/><category term="active directory"/><category term="add role"/><category term="add-in"/><category term="adjacent sibling"/><category term="adodb.recordset"/><category term="alert"/><category term="alert box"/><category term="alexa"/><category term="alter column"/><category term="alter table"/><category term="and operator"/><category term="animated photos"/><category term="animation"/><category term="application_onend"/><category term="application_onstart"/><category term="apps"/><category term="arrow box"/><category term="art of coding"/><category term="article"/><category term="aside"/><category term="async"/><category term="asyncronous"/><category term="at-rules"/><category term="authorization"/><category term="automated auto indexing"/><category term="autoplay"/><category term="avg"/><category term="avoid frame"/><category term="background-clip"/><category term="backslash"/><category term="backup"/><category term="balloon"/><category term="banner"/><category term="bar charts"/><category term="barcode"/><category term="basic editor"/><category term="begin"/><category term="bigtext"/><category term="bkf"/><category term="bootpause"/><category term="border-image"/><category term="both"/><category term="brackets"/><category term="breadcrumbs"/><category term="break-word"/><category term="broswer detection"/><category term="browscap.ini"/><category term="browser capabilities component"/><category term="browser check"/><category term="browser support"/><category term="browser usage"/><category term="browsershots"/><category term="browsertype"/><category term="built-in stylesheet"/><category term="bulleted list"/><category term="bust out of frames"/><category term="busting"/><category term="button generator"/><category term="buzzboost"/><category term="calendar"/><category term="call"/><category term="captha"/><category term="case"/><category term="cast"/><category term="catch"/><category term="cdate"/><category term="center"/><category term="centimeters"/><category term="chaining"/><category term="check"/><category term="checkbox"/><category term="checked"/><category term="chrome"/><category term="cleartype"/><category term="clientHeight"/><category term="clip"/><category term="clock"/><category term="cm"/><category term="coalesce"/><category term="code editor"/><category term="codec"/><category term="color"/><category term="colors"/><category term="columnizer"/><category term="combined"/><category term="common mistakes"/><category term="compare table"/><category term="components"/><category term="compress"/><category term="conditional comment"/><category term="confirm box"/><category term="connection string"/><category term="constrains"/><category term="content"/><category term="content rotator"/><category term="content.width"/><category term="control panel"/><category term="controls"/><category term="convention"/><category term="convert"/><category term="count"/><category term="counter"/><category term="counter-increment"/><category term="counter-reset"/><category term="country specific URL"/><category term="create QR code"/><category term="create database"/><category term="create index"/><category term="create table"/><category term="create_date"/><category term="createparameter"/><category term="creativity"/><category term="cross browser"/><category term="css arrow please"/><category term="csswarp"/><category term="current user online"/><category term="cursor"/><category term="custom error"/><category term="custom filter"/><category term="custom query"/><category term="dNotify"/><category term="dashboard"/><category term="database"/><category term="datename"/><category term="datepart"/><category term="datepicker"/><category term="day"/><category term="dbadmin"/><category term="debug"/><category term="decode"/><category term="default stylesheet"/><category term="delay service"/><category term="deprecated tags"/><category term="description"/><category term="design inspiration"/><category term="designers toolbox"/><category term="developer toolbar"/><category term="dictionary object"/><category term="difference"/><category term="disabled"/><category term="display"/><category term="display:none"/><category term="div"/><category term="do"/><category term="dochub"/><category term="document object model"/><category term="document.getElementsByName"/><category term="document.getElementsByTagName"/><category term="double click"/><category term="double quotes"/><category term="double submit"/><category term="download"/><category term="draggable"/><category term="drinks"/><category term="drop boxes"/><category term="drop database"/><category term="drop index"/><category term="drop table"/><category term="dynamic descriptions"/><category term="dynamic keywords"/><category term="dynamic rule"/><category term="e-commerce"/><category term="each"/><category term="editor"/><category term="elipse"/><category term="else"/><category term="elseif"/><category term="em"/><category term="embed JavaScript"/><category term="embedded image"/><category term="emulator"/><category term="enabled"/><category term="encode"/><category term="end"/><category term="error messages"/><category term="eval"/><category term="every windows version"/><category term="evolution"/><category term="ex"/><category term="excerpt"/><category term="execute stored procedures"/><category term="exists"/><category term="experiment"/><category term="export"/><category term="export blog"/><category term="export mailbox"/><category term="export to excel"/><category term="export to mdb"/><category term="export to word"/><category term="external file"/><category term="feedback"/><category term="feedburner"/><category term="fibonacci"/><category term="file exists"/><category term="file name"/><category term="fittext"/><category term="flash"/><category term="flip"/><category term="folder"/><category term="font detection"/><category term="font size"/><category term="font-face"/><category term="foreign key"/><category term="forums"/><category term="frame"/><category term="free images"/><category term="gallery slideshow"/><category term="geolocation"/><category term="getdate"/><category term="getfilename"/><category term="global.asa"/><category term="graceful degradation"/><category term="gradient"/><category term="group"/><category term="gui"/><category term="hacks"/><category term="hand drawn"/><category term="hand-drawn"/><category term="head"/><category term="hexadecimal"/><category term="hidden"/><category term="highlight"/><category term="horizontal"/><category term="hover; background colour"/><category term="href"/><category term="hsl"/><category term="hsla"/><category term="html 4.01"/><category term="html5 ajax"/><category term="http 301"/><category term="http 302"/><category term="http request"/><category term="hyphenate"/><category term="hyphenatpr.js"/><category term="hyphens"/><category term="icon"/><category term="ie"/><category term="ie netrenderer"/><category term="ietester"/><category term="iframe"/><category term="import"/><category term="import mailbox"/><category term="in operator"/><category term="inches"/><category term="include jQuery"/><category term="includes"/><category term="indexedDB calc()"/><category term="infinite scroll"/><category term="info site"/><category term="injection"/><category term="inner join"/><category term="innerHTML"/><category term="installation"/><category term="integrity check"/><category term="internet"/><category term="isnull"/><category term="isnumeric"/><category term="jQuery tools"/><category term="jQuery.browser"/><category term="jquery.qrcode"/><category term="jsdoc"/><category term="jshint"/><category term="jslint"/><category term="jsqrcode"/><category term="last updated"/><category term="lastModified"/><category term="layer styles"/><category term="layers"/><category term="layout"/><category term="lcase"/><category term="li"/><category term="like"/><category term="linear"/><category term="linked list boxes"/><category term="linked table"/><category term="live character count"/><category term="load"/><category term="load content"/><category term="loader"/><category term="loops"/><category term="ltrim"/><category term="mailbox store"/><category term="maintenance"/><category term="margin"/><category term="max"/><category term="measurement values"/><category term="menu generator"/><category term="merge mailbox"/><category term="message"/><category term="meta tag"/><category term="meta tags"/><category term="millimeters"/><category term="min"/><category term="mine type"/><category term="minimise"/><category term="mixed"/><category term="mixins"/><category term="mm"/><category term="modem"/><category term="modernizr.mq"/><category term="modify_date"/><category term="month"/><category term="mp4"/><category term="ms word"/><category term="mso-number-format"/><category term="multilingual web sites"/><category term="multiple images"/><category term="my fonts"/><category term="naming"/><category term="nav"/><category term="navigator object"/><category term="ncr"/><category term="nested list"/><category term="new features"/><category term="none"/><category term="object"/><category term="odbc"/><category term="odd"/><category term="offsetHeight"/><category term="ogg"/><category term="onClick"/><category term="onblur"/><category term="one page"/><category term="onfocus"/><category term="onkeyup"/><category term="online shop"/><category term="onunload"/><category term="opacity"/><category term="open()"/><category term="opentextfile"/><category term="operating system"/><category term="option.explicit"/><category term="outlook"/><category term="outlook 2003"/><category term="outlook mobile access"/><category term="outlook pst viewer"/><category term="overflow"/><category term="overflow-x"/><category term="overflow-y"/><category term="owanotify"/><category term="page title"/><category term="palette"/><category term="parameters.append"/><category term="parent"/><category term="passcode lock"/><category term="paul Rouget"/><category term="pc"/><category term="period"/><category term="permanet redirect"/><category term="permission"/><category term="picas"/><category term="pivot"/><category term="pixels"/><category term="please wait"/><category term="points"/><category term="polls"/><category term="pop2owa"/><category term="popup boxes"/><category term="post"/><category term="post-it"/><category term="preload"/><category term="previous"/><category term="primary key"/><category term="problem"/><category term="progress"/><category term="progressive enhancement"/><category term="prompt box"/><category term="property"/><category term="pseudo classes"/><category term="pst"/><category term="psuedo-element"/><category term="pt"/><category term="px"/><category term="qr code"/><category term="radial"/><category term="rand()"/><category term="random"/><category term="re-design"/><category term="real-time"/><category term="recovery storage group"/><category term="rect"/><category term="reference"/><category term="refresh parent window"/><category term="related post widget"/><category term="relative"/><category term="remainder"/><category term="remote server"/><category term="remove"/><category term="request.cookies"/><category term="request.form"/><category term="request.querystring"/><category term="reset css"/><category term="resizable"/><category term="resizeMyBrowser"/><category term="response"/><category term="response.addheader"/><category term="response.buffer"/><category term="response.cookies"/><category term="response.flush()"/><category term="response.redirect"/><category term="responsive"/><category term="restart"/><category term="return confirm"/><category term="rgb"/><category term="rgbs"/><category term="rotating image"/><category term="round-trip time"/><category term="rtrim"/><category term="rtt"/><category term="rule"/><category term="schedule"/><category term="scheme"/><category term="screen.height"/><category term="scrollBy"/><category term="scrollHeight"/><category term="scrollTop"/><category term="scrollable"/><category term="search box"/><category term="section"/><category term="selected"/><category term="selectivzr"/><category term="self.close"/><category term="semicolon"/><category term="server 2008"/><category term="server manager"/><category term="server status"/><category term="session_onend"/><category term="session_onstart"/><category term="setTimeout"/><category term="seven"/><category term="show"/><category term="simple"/><category term="simulator"/><category term="skype"/><category term="slowed down"/><category term="sound"/><category term="soundex"/><category term="split"/><category term="sql server maintenance solution"/><category term="static"/><category term="status code"/><category term="sticky note"/><category term="strict"/><category term="structure"/><category term="style.height"/><category term="style.maxHeight"/><category term="style.minHeight"/><category term="subquery"/><category term="subroutines"/><category term="sum"/><category term="sys.index_columns"/><category term="sys.indexes"/><category term="syscolumns"/><category term="system"/><category term="tablets"/><category term="tag"/><category term="target.window.location.href"/><category term="task scheduler"/><category term="technorati"/><category term="telephone"/><category term="telephone number"/><category term="template"/><category term="text"/><category term="text to path"/><category term="text-shadow"/><category term="the cult of done"/><category term="the restart page"/><category term="then"/><category term="thumbnail"/><category term="timer()"/><category term="title"/><category term="toggle all"/><category term="tool"/><category term="toolbar"/><category term="toolbox"/><category term="top.opener"/><category term="topics"/><category term="transition"/><category term="transitional"/><category term="truncate table"/><category term="try"/><category term="try...catch"/><category term="typeface.js"/><category term="ucase"/><category term="ul"/><category term="ultimate css gradient generator"/><category term="unchecked"/><category term="underscore"/><category term="unprefix"/><category term="unprefixing"/><category term="upgrading"/><category term="user experience"/><category term="vbs"/><category term="vertical"/><category term="vertical text"/><category term="vgx.dll"/><category term="viewport"/><category term="virtual server"/><category term="virtualisation"/><category term="visibility"/><category term="visibility:hidden"/><category term="visitors"/><category term="vista"/><category term="vml"/><category term="void(0)"/><category term="w3c wiki"/><category term="wazala"/><category term="web analysis"/><category term="webM"/><category term="wend"/><category term="what the font"/><category term="while"/><category term="white space"/><category term="widget"/><category term="width"/><category term="wildcard"/><category term="window.close"/><category term="window.innerHeight"/><category term="window.open"/><category term="windows"/><category term="windows server"/><category term="word-wrap"/><category term="wordpress"/><category term="writing-mode"/><category term="xmlhttp.status"/><category term="year"/><title type='text'>the web thought</title><subtitle type='html'>Web development, web design and programming.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default?alt=atom&amp;max-results=50&amp;redirect=false'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default?alt=atom&amp;start-index=51&amp;max-results=50&amp;redirect=false'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>402</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>50</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1830753301097417129</id><published>2013-04-23T07:00:00.000+02:00</published><updated>2013-04-23T07:00:10.052+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="background image"/><category scheme="http://www.blogger.com/atom/ns#" term="button"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="css3"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><title type='text'>CSS and HTML5: background image in buttons</title><content type='html'>Would you like to do something like:
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibnWGpxLsJRVPR0ZNq-KNGOZiJZYqcYwUJiy9ihG72JtlZ9O7lfB6pmGJVdhuwzel6DB5vYogys4KAsn9jpm1MICRpxOAwx32w-XaNki6JUd1aGptpmCxnJrxYl8QAulwlyixWLfg8RtI/s1600/btn1.jpg&quot; /&gt;&lt;/div&gt;
&lt;br /&gt;
Or maybe you prefer it another way, like:&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
.btn {

height: 37px; 
width: 37px;   
background-image:url(&#39;http://www.w3.org/html/logo/downloads/HTML5_Logo_32.png&#39;);
background-repeat:no-repeat;
}
&lt;/style&gt;

&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;button class=&quot;btn&quot;&gt;&lt;/button&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
They look the same, don&#39;t they? However they are a bit different in the making. Let&#39;s see how...&lt;br /&gt;
&lt;br /&gt;
The first way to do such thing is to use the &amp;lt;button&amp;gt; tag:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;button&amp;gt;&lt;br /&gt;
&amp;lt;img src=&quot;http://www.w3.org/html/logo/downloads/HTML5_Logo_32.png&quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The image is just like any text we usually put inside the tag. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Yet there&#39;s another way, which uses background-images in CSS. I personally believe that it is a better way of handling the button.&lt;br /&gt;
In the above examples, the first is an image (as you can see you can&#39;t click on it), while the second is live (it&#39;s an actual button you can click but that does nothing).&lt;br /&gt;
&lt;br /&gt;
In order to do it the second way, we need to create a short style, like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;
.btn {&lt;br /&gt;
height: 37px; &lt;br /&gt;
width: 37px;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
background-image:url(&#39;http://www.w3.org/html/logo/downloads/HTML5_Logo_32.png&#39;);&lt;br /&gt;
background-repeat:no-repeat;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
And then, we need to insert our button (assigning the related class) where we want to:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;button class=&quot;btn&quot;&amp;gt;&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
And that is all.&lt;br /&gt;
&lt;br /&gt;
Short post, for very very busy days. See you next time!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1830753301097417129/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/css-and-html5-background-image-in.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1830753301097417129'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1830753301097417129'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/css-and-html5-background-image-in.html' title='CSS and HTML5: background image in buttons'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibnWGpxLsJRVPR0ZNq-KNGOZiJZYqcYwUJiy9ihG72JtlZ9O7lfB6pmGJVdhuwzel6DB5vYogys4KAsn9jpm1MICRpxOAwx32w-XaNki6JUd1aGptpmCxnJrxYl8QAulwlyixWLfg8RtI/s72-c/btn1.jpg" height="72" width="72"/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5295687850963534116</id><published>2013-04-18T07:00:00.000+02:00</published><updated>2013-04-18T07:00:00.735+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="scroll"/><category scheme="http://www.blogger.com/atom/ns#" term="scroll to the top of page"/><category scheme="http://www.blogger.com/atom/ns#" term="scrollTop"/><title type='text'>jQuery: scroll to the top, to a specific container and to the bottom of a page</title><content type='html'>Some time ago I wrote an article where we discussed how to use &lt;b&gt;JavaScript &lt;/b&gt;to create a &lt;a href=&quot;http://thewebthought.blogspot.com/2012/06/javascript-smooth-scroll-to-top-of-page.html&quot; target=&quot;_blank&quot;&gt;smooth scroll to the top of the page&lt;/a&gt;.&lt;br /&gt;
Today we are going to see how to do it with &lt;b&gt;jQuery&lt;/b&gt;, and we are going to do it in order to scroll to the &lt;b&gt;top&lt;/b&gt; of the page and even to the &lt;b&gt;bottom &lt;/b&gt;of the page. After that we are going to create a simple jQuery function that will scroll to a &lt;b&gt;specific element&lt;/b&gt; of the page.&lt;br /&gt;
&lt;br /&gt;
Interested? Ok... follow me.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Top and Bottom&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The code is very simple. First of all, include the jQuery library in the head of your document (this is valid for the second example as well):&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;yourPath/jquery.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
After that, we create two links: one for the scroll-to-top, and one for the scroll-to-bottom. Remember to place them where you need them!&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;javascript:scrollToBottom()&quot;&amp;gt;Bottom&amp;lt;/a&amp;gt;&lt;br /&gt;
&amp;lt;a href=&quot;javascript:scrollToTop()&quot;&amp;gt;Top&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Now, again in the head of your document the jQuery script:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function scrollToBottom() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&#39;html, body&#39;).animate({scrollTop:$(document).height()}, &#39;slow&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; function scrollToTop() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&#39;html, body&#39;).animate({scrollTop:0}, &#39;slow&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
And we&#39;re done.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Scroll to a specific point&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Now... if we need to scroll to a specific point on a page, we can create a target element, like a div:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div class=&quot;scrollTarget&quot;&amp;gt;We will scroll to here&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Now we insert the &quot;void&quot; link where we need the scroll to be triggered by a click:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href&quot;javascript:void(0)&quot; onclick=&quot;scrollPageTo(&#39;.scrollTarget&#39;, 15)&quot;&amp;gt;Scroll to div&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
We pass two parameters to the function: the first is our target and the &quot;.&quot; or &quot;#&quot; is needed depending on the type of selector (class or ID) we used (in our case it&#39;s a class so &quot;.&quot;). The second parameter is used to scroll to a position which is just 15 pixels above the target. The second parameter is optional, but it can be used to make the scroll as perfect as we need it.&lt;br /&gt;
The function has to be place in the head of our document:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; function scrollPageTo(myTarget, topPadding) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (topPadding == undefined) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; topPadding = 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var moveTo = $(myTarget).offset().top - topPadding;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&#39;html, body&#39;).stop().animate({&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; scrollTop: moveTo&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, 1000);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
I must say I&#39;ve found the above snippet somewhere a long time ago and I can&#39;t remember where. I&#39;m sure I&#39;ve used it more than once in web pages and I have surely modified it somehow.&lt;br /&gt;
&lt;br /&gt;
In any case, there we are.&lt;br /&gt;
&lt;br /&gt;
Take care and see you next time!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5295687850963534116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/jquery-scroll-to-top-to-specific.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5295687850963534116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5295687850963534116'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/jquery-scroll-to-top-to-specific.html' title='jQuery: scroll to the top, to a specific container and to the bottom of a page'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-371803425096180101</id><published>2013-04-16T07:00:00.000+02:00</published><updated>2013-04-16T07:00:09.429+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><category scheme="http://www.blogger.com/atom/ns#" term="VBScript"/><title type='text'>ASP: pass a variable to JavaScript</title><content type='html'>One of the most often asked question in forums is &quot;how do I pass an &lt;b&gt;ASP&lt;/b&gt; variable to &lt;b&gt;JavaScript&lt;/b&gt;?&quot;&lt;br /&gt;
It is quite common to find out that people ask the question the other way round: &quot;How do I pass a &lt;b&gt;JavaScript&lt;/b&gt; variable to &lt;b&gt;ASP&lt;/b&gt;?&quot;&lt;br /&gt;
Ok, the two things are completely different and they involve completely different solutions.&lt;br /&gt;
&lt;br /&gt;
First of all, let me explain something you might already know. ASP (or to be precise VBScript) is a server side language, while JavaScript is a client side language. The two work on different levels: ASP is executed before the page is completely loaded, while JavaScript works only after that. For that reason we cannot pass a JavaScript variable to ASP without reloading the page.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Say that, if we need to convert a JavaScript variable to ASP, we need to pass it using the page URL and get the variable or use a form a submit an hidden value. Those are simple solutions, but - I must say - not really elegant solution.&lt;br /&gt;
Let&#39;s see an example. The JavaScript part (to be inserted in the head of the document) could be something like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;br /&gt;function GetHidden()&lt;br /&gt;{&lt;br /&gt;document.form1.action=&quot;http://YourPageName.asp&quot;;&lt;br /&gt;&lt;br /&gt;document.form1.submit();&lt;br /&gt;}&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The HTML part could be:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;form id=&quot;form1&quot; runat=&quot;server&quot;&amp;gt;&lt;br /&gt;&amp;lt;a href=&quot;#&quot; onclick=&quot;GetHidden();&quot; &amp;gt;Click Here&amp;lt;/a&amp;gt;&lt;br /&gt;&amp;lt;input type=&quot;hidden&quot; id=&quot;txt1&quot; name=&quot;txt1&quot; value=&quot;ourTestValue&quot; /&amp;gt;&lt;br /&gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
And finally our ASP code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;dim strVal&lt;br /&gt;strVal=Request.Form(&quot;txt1&quot;)&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
What about the other way round: pass an ASP variable to JavaScript. Well, that is much much easier!&lt;br /&gt;
Suppose our ASP variable is &quot;ASPVariable&quot; and our new JavaScript variable is &quot;JSVariable&quot;, the JavaScript code would be:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script language=javascript&amp;gt;&lt;br /&gt;var JSVariable = &amp;lt;%=ASPVariable%&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Simple as that.&lt;br /&gt;
&lt;br /&gt;
I hope you find the post interesting enough. Keep on following &lt;i&gt;the web thought&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
PS: this is the 400th post! Wow, I couldn&#39;t believe it when I saw it. &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/371803425096180101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/asp-pass-variable-to-javascript.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/371803425096180101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/371803425096180101'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/asp-pass-variable-to-javascript.html' title='ASP: pass a variable to JavaScript'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-754385847475301988</id><published>2013-04-11T07:00:00.000+02:00</published><updated>2013-04-11T07:00:07.211+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="css3"/><category scheme="http://www.blogger.com/atom/ns#" term="post-it"/><category scheme="http://www.blogger.com/atom/ns#" term="sticky note"/><title type='text'>CSS: create a post-it note</title><content type='html'>I&#39;ve recently needed to create some sort of post-it note for a web site. The general look of the homepage was like a working desk, and it was suggested to add a yellow post-it somewhere in the upper right corner of the viewport.&lt;br /&gt;
Because I know that time is money and that we don&#39;t really need to reinvent the wheel, I have collected some solutions I&#39;ve found on the web.&lt;br /&gt;
If you&#39;re interested, please keep on reading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;a href=&quot;http://webdesignandsuch.com/create-a-post-it-note-with-css3/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Create a Post-it Note with CSS3&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://webdesignandsuch.com/wp-content/uploads/post-it-with-css1-575x272.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Post-it&quot; border=&quot;0&quot; height=&quot;151&quot; src=&quot;http://webdesignandsuch.com/wp-content/uploads/post-it-with-css1-575x272.jpg&quot; title=&quot;Post-it&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://mentormate.com/blog/css-postit-note/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;The 100% CSS Post-it® Note&lt;/a&gt;&lt;br /&gt;
&lt;link href=&quot;http://fonts.googleapis.com/css?family=Reenie+Beanie&quot; rel=&quot;stylesheet&quot; type=&quot;text/css&quot;&gt;&lt;/link&gt;
&lt;style&gt;
.postit { 
  color: black; 
  text-align:center;     
  width: 275px;    
  margin: 25px;    
  min-height:175px;
  max-height:175px;
  padding-top:35px;
  position:relative;   
  border:1px solid #E8E8E8;  
  border-top:60px solid #fdfd86;
  font-family:&#39;Reenie Beanie&#39;;    
  font-size:22px;      
  border-bottom-right-radius: 60px 5px;
  display:inline-block;    
  background: rgb(255,255,136); /* Old browsers */
  background: -moz-linear-gradient(-45deg, rgba(255,255,136,1) 77%, rgba(255,255,214,1) 100%); /* FF3.6+ */
  background: -webkit-gradient(linear, left top, right bottom, color-stop(77%,rgba(255,255,136,1)), color-stop(100%,rgba(255,255,214,1))); /* Chrome,Safari4+ */
  background: -webkit-linear-gradient(-45deg, rgba(255,255,136,1) 77%,rgba(255,255,214,1) 100%); /* Chrome10+,Safari5.1+ */
  background: -o-linear-gradient(-45deg, rgba(255,255,136,1) 77%,rgba(255,255,214,1) 100%); /* Opera 11.10+ */
  background: -ms-linear-gradient(-45deg, rgba(255,255,136,1) 77%,rgba(255,255,214,1) 100%); /* IE10+ */
  background: linear-gradient(-45deg, rgba(255,255,136,1) 77%,rgba(255,255,214,1) 100%); /* W3C */
  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=&#39;#ffff88&#39;, endColorstr=&#39;#ffff88&#39;,GradientType=0 ); /* IE6-9 fallback on horizontal gradient */
}

.postit:after {     
   content: &quot;&quot;;
  position:absolute;
  z-index:-1;
  right:-0px; bottom:20px;
  width:200px;
  height: 25px;
  background: rgba(0, 0, 0, 0.2);
  box-shadow:2px 15px 5px rgba(0, 0, 0, 0.40);
-moz-transform: matrix(-1, -0.1, 0, 1, 0, 0);
 -webkit-transform: matrix(-1, -0.1, 0, 1, 0, 0);
      -o-transform: matrix(-1, -0.1, 0, 1, 0, 0);
     -ms-transform: matrix(-1, -0.1, 0, 1, 0, 0);
         transform: matrix(-1, -0.1, 0, 1, 0, 0);
}  &lt;/style&gt;

&lt;br /&gt;
&lt;div style=&quot;background-color: white;&quot;&gt;
&lt;div class=&quot;postit&quot;&gt;
Hello everybody!&lt;br /&gt;
This is not an image!&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;a href=&quot;http://net.tutsplus.com/tutorials/html-css-techniques/create-a-sticky-note-effect-in-5-easy-steps-with-css3-and-html5/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Create a Sticky Note Effect in 5 Easy Steps with CSS3 and HTML5&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://d2o0t5hpnwv4c1.cloudfront.net/771_sticky/step5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Post-it&quot; border=&quot;0&quot; height=&quot;218&quot; src=&quot;http://d2o0t5hpnwv4c1.cloudfront.net/771_sticky/step5.png&quot; title=&quot;Post-it&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;a href=&quot;http://onwebdev.blogspot.com/2011/04/css-post-it-note.html&quot;&gt;CSS: post 
it note&lt;/a&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://dev.css-zibaldone.com/onwebdev/post/postit2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://dev.css-zibaldone.com/onwebdev/post/postit2.jpg&quot; width=&quot;185&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/754385847475301988/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/css-create-post-it-note.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/754385847475301988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/754385847475301988'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/css-create-post-it-note.html' title='CSS: create a post-it note'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-552021496024165025</id><published>2013-04-09T07:00:00.000+02:00</published><updated>2013-04-09T07:00:05.456+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="database administrator"/><category scheme="http://www.blogger.com/atom/ns#" term="dbadmin"/><category scheme="http://www.blogger.com/atom/ns#" term="ms access"/><title type='text'>Ms Access: database administrator</title><content type='html'>Today I would like to share something that I&#39;ve found a long time ago (exactly around 2008). The thing is I still find it useful today while at that time it has saved me in critical situation a lot of times.&lt;br /&gt;
It is called &lt;b&gt;DBAdmin&lt;/b&gt; and I think you should have a look at it if you administer &lt;b&gt;MS Access&lt;/b&gt; databases over the internet.&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;StP Database Administrator (DBAdmin below) is a tool that allows you to manage your MS Access databases through your browser, providing various set of functions you can perform with your databases, without having downloading them, changing and uploading again. Most of features needed for database management are included, you can even create a new blank databases on-line.&quot;&lt;/blockquote&gt;
The things you can do with DBAdmin are incredible and because we don&#39;t really want to download-change-upload our mdbs wasting time, the tool is a perfect companion.&lt;br /&gt;
&lt;br /&gt;
Have a quick look at the &lt;a href=&quot;http://blog.stpworks.com/archive/2008/04/30/database-administrator-for-ms-access.aspx&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;tool page&lt;/a&gt; and let me know what you think. &lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/552021496024165025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/ms-access-database-administrator.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/552021496024165025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/552021496024165025'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/ms-access-database-administrator.html' title='Ms Access: database administrator'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4012392461215330014</id><published>2013-04-04T07:00:00.000+02:00</published><updated>2013-04-04T07:00:07.564+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="background image"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="css3"/><category scheme="http://www.blogger.com/atom/ns#" term="psuedo-element"/><category scheme="http://www.blogger.com/atom/ns#" term="rotate"/><category scheme="http://www.blogger.com/atom/ns#" term="transform"/><title type='text'>CSS: rotate background images</title><content type='html'>We can use &lt;b&gt;CSS &lt;/b&gt;to &lt;b&gt;rotate &lt;/b&gt;elements in a web page. You may already know about it, but a friend of mine asked me how to rotate a &lt;b&gt;background image&lt;/b&gt;, without rotating the container.&lt;br /&gt;
Hmmm... that was a question, but the answer surprised me when I found how to do it.&lt;br /&gt;
Are you interested? Well, get into the article and see how to do it.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The basics&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
As said, we can rotate a container using transform: rotate. Just consider that you element has a class=&quot;myContainer&quot;. We can rotate it by using a rule like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
.myContainer&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; -webkit-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp; -moz-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp; -ms-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp; -o-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp; transform: rotate(30deg);&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
With the above we rotate the container by 30 degrees.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;To rotate or not to rotate?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We can now consider the above and decide to rotate only the background image inside the container, or to rotate the container but not the image inside it.&lt;br /&gt;
Ah! Is it possible? Yes, it is.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s see how to rotate the image but not the container.&lt;br /&gt;
Considering the above container (class=&quot;mycontainer&quot;) we can apply any rule to it, but we have to position it in a relative way and hide the overflow.&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
.myContainer&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; position: relative;&lt;br /&gt;&amp;nbsp; overflow: hidden;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;
Now we need to create a pseudo element, position it absolutely with a transformed background:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
.myContainer:before&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;content: &quot;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;position: absolute;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;width: 200%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;height: 200%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;top: -50%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;left: -50%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;z-index: -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;background: url(bckImage.jpg) 0 0 repeat;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-webkit-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-moz-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-ms-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-o-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;transform: rotate(30deg);&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;
Note that we need to set the z-index to -1 in order to make it appear below the container.&lt;br /&gt;
&lt;br /&gt;
What about a fixed background with a rotated container?&lt;br /&gt;
We need a pseudo element again. But first we need to rotate the container:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
.myContainer&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;position: relative;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;overflow: hidden;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-webkit-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-moz-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-ms-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-o-transform: rotate(30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;transform: rotate(30deg);&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;
Ok. Now we use the pseudo element and we &quot;counter-rotate&quot; the background. Ah! That&#39;s the trick!&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
.myContainer:before&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;content: &quot;&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;position: absolute;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;width: 200%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;height: 200%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;top: -50%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;left: -50%;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;z-index: -1;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;background: url(bckImage.jpg) 0 0 repeat;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-webkit-transform: rotate(-30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-moz-transform: rotate(-30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-ms-transform: rotate(-30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;-o-transform: rotate(-30deg);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;transform: rotate(-30deg);&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;
And that&#39;s it.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Compatibility?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
All the above works perfectly in IE9, Firefox, Chrome, Safari and Opera. We have little trouble with IE8: the transformation is not working, but the background will appear.IE6 and IE7 don&#39;t know anything about pseudo elements, so nothing will be applied.&lt;br /&gt;
&lt;br /&gt;
Let me know what you think about the examples, as usual, using the comments section below.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4012392461215330014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/css-rotate-background-images.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4012392461215330014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4012392461215330014'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/css-rotate-background-images.html' title='CSS: rotate background images'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7659422790651500696</id><published>2013-04-02T07:00:00.000+02:00</published><updated>2013-04-02T07:00:00.407+02:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="calendar"/><category scheme="http://www.blogger.com/atom/ns#" term="datepicker"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="plug-in"/><title type='text'>jQuery: calendar and datepicker plugins</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s1600/jq.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s1600/jq.jpg&quot; /&gt;&lt;/a&gt;Holidays time - short post. I hope you find it useful.&lt;br /&gt;
Now on with the &lt;b&gt;calendar &lt;/b&gt;and &lt;b&gt;datepicker jQuery plugin &lt;/b&gt;parade!&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.webappers.com/2010/06/08/wdcalendar-jquery-based-google-calendar-clone/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;wdCalendar – jQuery Based Google Calendar Clone&lt;/a&gt;&lt;br /&gt;
&quot;wdCalendar
 is a jquery based google calendar clone. It cover most google calendar 
features. User can choose to have a daily view, weekly view or monthly 
view. User can easily create, update or remove events by drag &amp;amp; 
drop. It is very simple to to integrate wdCalendar with a database.&lt;br /&gt;
wdCalendar is free (open source LGPL license), easy to use, and with great functionalities.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.codfusion.com/blog/page.cfm/projects/event-calendar&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Event Calendar&lt;/a&gt;&lt;br /&gt;
&quot;Event Calendar is a jQuery and ColdFusion event calendar that works a 
lot like the Google Calendar system. With Event Calendar, you can share 
calendar information throughout your organization. There is also a 
simple user facade, that you can extend, to help control user rights.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://bugsvoice.com/applications/bugsVoice/site/test/calendarPickerDemo.jsp&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery.calendarPicker&lt;/a&gt;&lt;br /&gt;
&quot;This component is a light-weight calendar/date-picker.
&lt;br /&gt;
Some features:
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;supports internationalization (supports do not necessary means it is implemented:-) )&lt;/li&gt;
&lt;li&gt;supports changing current date&lt;/li&gt;
&lt;li&gt;supports mouse wheel scrolling&lt;/li&gt;
&lt;li&gt;supporting (deferred) callback on date selection&lt;/li&gt;
&lt;li&gt;supports variable number of years, months and days&lt;/li&gt;
&lt;li&gt;supports next/prev arrows&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.eyecon.ro/datepicker/#about&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Date Picker - jQuery plugin&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&quot;Date Picker component with a lot of options and easy to fit in your web application.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://arshaw.com/fullcalendar/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;FullCalendar&lt;/a&gt;&lt;br /&gt;
&quot;FullCalendar is a jQuery plugin that provides a full-sized,
 drag &amp;amp; drop calendar like the one below. It uses AJAX to fetch
 events on-the-fly for each month and is easily configured to use your own feed
 format (an extension is provided for Google Calendar). It is visually
 customizable and exposes hooks for user-triggered events (like clicking or
 dragging an event).
 It is open source licensed under an
 MIT license.&quot;
 &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://keith-wood.name/datepick.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery Datepicker&lt;/a&gt;&lt;br /&gt;
&quot;A jQuery plugin
 that attaches a popup calendar to your input fields or shows an
 inline calendar for selecting individual dates or date ranges.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.overset.com/2008/05/12/multiday-calendar-datepicker-jquery-plugin/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Multiday Calendar Datepicker JQuery Plugin&lt;/a&gt;&lt;br /&gt;
&quot;Multi-day, multi-month animated datepicker jQuery plugin that weighs in at 14KB with the uncompressed development version.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/jquery-frontier-calendar/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery Frontier Calendar&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&quot;Full month calendar jQuery plugin that looks like Google Calendar.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://jqueryui.com/datepicker/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery UI datepicker&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://tympanus.net/codrops/2012/11/27/calendario-a-flexible-calendar-plugin/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Calendario&lt;/a&gt;&lt;br /&gt;
&quot;Today we want to share a flexible calendar concept with you. Calendars 
can be a very tricky thing when it comes to their layout and 
responsiveness. This is an experiment for trying out some grid layouts 
that can be applied to calendars. We’ve created a jQuery plugin for the 
calendar itself and you can see some examples of how to use it in the 
demos. The aim is to provide a suitable layout for both, small and big 
screens and keeping the calendar structure fluid when possible. On large
 screens we want to show a grid-based layout while on smaller screens, 
we want to simply stack the days of the month.&quot;&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/7659422790651500696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/04/jquery-calendar-and-datepicker-plugins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/7659422790651500696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/7659422790651500696'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/04/jquery-calendar-and-datepicker-plugins.html' title='jQuery: calendar and datepicker plugins'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s72-c/jq.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1742967128252256187</id><published>2013-03-31T00:30:00.000+01:00</published><updated>2013-03-31T00:30:00.035+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="offtopic"/><category scheme="http://www.blogger.com/atom/ns#" term="the web thought"/><title type='text'>Happy Easter</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WhUAAxHWmzVu4-I1ghEIQuRYVyB5DsPGr5uW8jIykM7HLrMOPIA-QxylIxkeYhsbDhJUWNrEpbrdscUbzO7s28H9QTb9jXXoiiD_2ANQGcxnjRHVDSzE8U1L1_QbzH0SDMdtzeHRf_8/s1600/happy_easter.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;324&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WhUAAxHWmzVu4-I1ghEIQuRYVyB5DsPGr5uW8jIykM7HLrMOPIA-QxylIxkeYhsbDhJUWNrEpbrdscUbzO7s28H9QTb9jXXoiiD_2ANQGcxnjRHVDSzE8U1L1_QbzH0SDMdtzeHRf_8/s640/happy_easter.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1742967128252256187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/happy-easter.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1742967128252256187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1742967128252256187'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/happy-easter.html' title='Happy Easter'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0WhUAAxHWmzVu4-I1ghEIQuRYVyB5DsPGr5uW8jIykM7HLrMOPIA-QxylIxkeYhsbDhJUWNrEpbrdscUbzO7s28H9QTb9jXXoiiD_2ANQGcxnjRHVDSzE8U1L1_QbzH0SDMdtzeHRf_8/s72-c/happy_easter.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-399065193785032687</id><published>2013-03-28T07:00:00.000+01:00</published><updated>2013-03-28T07:00:09.663+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="foreign key"/><category scheme="http://www.blogger.com/atom/ns#" term="ms access"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="primary key"/><category scheme="http://www.blogger.com/atom/ns#" term="query"/><category scheme="http://www.blogger.com/atom/ns#" term="relational database"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="table"/><title type='text'>Relational databases: some simple rules (part 2)</title><content type='html'>This is the second part of the two parts article &quot;Relational databases: some simple rules&quot;.&lt;br /&gt;
&lt;br /&gt;
In the first part we have seen the ideas of tables and the way we can relate them.&lt;br /&gt;
And now... the conclusion!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Primary and foreign keys&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We now need to move on a bit, but please keep in mind the example made in the first part of the article: two tables, with a relation for the state column.&lt;br /&gt;
The names table has the following columns: ID, name, surname, address, post code, city, state.&lt;br /&gt;
The states table has the following columns: ID, state.&lt;br /&gt;
In the persons table, the “state” column will contain only IDs related to the states table.&lt;br /&gt;
The ID column in the person table is a primary key. The ID in the state table is a primary key.&lt;br /&gt;
The “state” column in the persons table is a foreign key.&lt;br /&gt;
Quite easy, isn’t it?&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;And next? Queries&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Following the above ideas, we can start to build our new database. Usually, we start from creating tables structures and then we fill them with records. But after that? How can we use the information stored in tables?&lt;br /&gt;
In &lt;i&gt;the web thought&lt;/i&gt;, we have seen many ways of using data stored in a database. We can use different programming languages in order to query our data, however the query commands and the resulting recordset is what really matters.&lt;br /&gt;
We cannot here list all the commands available in each environment used to query database. It is important here to consider that the basic rules always apply. There are many query builder around the web, and many tutorials that explain how to query a database, however we basically need to point to a table – or a set of related table – and fetch the data we want.&lt;br /&gt;
Once we have the information, we can show it and interact with the records. In fact we have different kind of queries: we can select records if we need to show them (possibly in a ordered form); we can update a table, delete records or insert a new record. All those operations (among others) are made using queries. So, if tables are the core of a database and relations are the way tables work together, queries are what we need in order to interact with records contained in tables.&lt;br /&gt;
There are in fact other ways we can use when we need to work on records contained in tables. In SQL Server for example we have views and stored procedures. However for the purpose of this article we are not going to see them. If you’re interested, &lt;i&gt;the web thought&lt;/i&gt; has many articles which can guide you on the use of SQL Server queries, stored procedure, functions etc (just use the search section, please).&lt;br /&gt;
As a general rule, building queries is an easy job. Creating an efficient query is far more difficult (specifically in complex queries). What I suggest is to create the query in the its simpliest form and then work on it in order to make it faster and more efficient.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
This two parts article was conceived because a friend told me to do simple tutorials on different subjects. One of them was the idea behind a relational database. &lt;br /&gt;
Writing about it isn’t really easy and being precise and short is a real challenge. As you may know there are hundreds of books (from “for dummies” to “for experts”) about it, and I surely don’t have the conceit to be a real expert. I’ve been creating and using relational databases since around 2000. Nobody taught me what I know... or – to better say it – many people on the internet have taught me what I know today. The rest is basically experience. But surely if I could have found an article like the above, surely I would have understood some basic rules which should be always taken into account when designing a relational database. I hope you have found the two articles interesting enough.&lt;br /&gt;
&lt;br /&gt;
As usual, please use the comments section below if you want to share your thoughts.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/399065193785032687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/relational-databases-some-simple-rules_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/399065193785032687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/399065193785032687'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/relational-databases-some-simple-rules_28.html' title='Relational databases: some simple rules (part 2)'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6145059449501238441</id><published>2013-03-26T07:00:00.000+01:00</published><updated>2013-03-26T07:00:10.607+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ms access"/><category scheme="http://www.blogger.com/atom/ns#" term="mysql"/><category scheme="http://www.blogger.com/atom/ns#" term="Oracle"/><category scheme="http://www.blogger.com/atom/ns#" term="query"/><category scheme="http://www.blogger.com/atom/ns#" term="relational database"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="table"/><title type='text'>Relational databases: some simple rules (part 1)</title><content type='html'>It doesn&#39;t matter what we prefer to use, either Ms Access or SQL Server or Oracle, or even MySql, but when we want to create a new database, we really need to consider its structure, plan it and finally create all the database elements.&lt;br /&gt;To do such a thing might seem easy – and in general it is – but a good development plan is what we need to avoid pitfalls and future issues with the structure of the database. The complexity of a database is surely one of the things to be considered, in fact it is clear that a more complex database will surely be more complex to develop.&lt;br /&gt;Some simple rules can be taken into account and in this two parts article we are going to see some important points we need to keep in mind when planning a new database.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Tables&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;When building a new database, the core of it will be a set of tables. Tables are made of rows and columns: each row consists in a record, each column defines the information contained in a row.&lt;br /&gt;For example a list of persons could have columns like: name, surname, address, post code, city, state etc.&lt;br /&gt;In each row we will have the actual information like: John, Smith, 22 Acacia Avenue, 12345, London, United Kingdom. “John” is a value of the column “name” and stays in a field. All the information in a row consist in a record. &lt;br /&gt;Think it as grid with column names: the actual records stay just below the column names. &lt;br /&gt;Now let’s take a big step ahead.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;Relational database&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Allow me, please, to stress out a bit the relational database concept, because it is very important. &lt;br /&gt;In order to simplify the concept we can make a simple example. Consider the persons table above. It’s a list of persons with the respective home address. We know that, for example, we are going to repeat the city or the state people live in for each record. Let’s say we have a list of 10000 names, then we are going to have 10000 cities and states. Just as an exercise, we can create that list and see how many times the very same city or state appear in the main table. That means, for example,&amp;nbsp; we can create a second table with just the list of all the cities and relate it to the first table. That will decrease the number of information in the first table... but how?&lt;br /&gt;Ok, we need to understand that more deeply.&lt;br /&gt;In the first example we need to create another column which will be always the first column we create in a new table: the ID column.&lt;br /&gt;The ID column contains a unique identifier for the record: every single record will a unique number which will identify it without any doubt. IDs help us a lot when we need to query tables and if used with indexes can speed up queries and make them more efficient. But in our scenario and the purpose of this article, we need IDs for other reasons. &lt;br /&gt;Our persons table will have 10000 records and columns like: ID, name, surname, address, post code, city, state.&lt;br /&gt;As said, because we have 10000 records, we will surely repeat at least cities and states quite often, especially if our list is related to a specific and not too wide area like Europe. Consider that in the world there are – more or less – 196 countries and that there are 193 countries which are members of the United Nations. As you can imagine, in our persons table we are going to repeat the country a lot.&lt;br /&gt;Another step: the size (in terms of disk usage) of our table is obviously related to the amount of data we have in it. The more record we have, the bigger the size will be. More information (in terms of characters in words) we store, bigger the table will be.&lt;br /&gt;In large databases, table size is important for different reasons and not only in relation with disk usage: the bigger the table, the slower the query. IDs and indexes can help us, but relations can be just the perfect choice.&lt;br /&gt;In fact, we can create a new states table with just two columns: ID and state. If we want to consider all the 193 states, we can put them all. In the persons table, the state column will not contain the state anymore, but the ID of the state table.&lt;br /&gt;I don’t want to get into a long discussion, but if you stop for a moment and think of that new architecture, you will surely understand that it will save a lot of space and the size of our persons table will decrease by a significant amount in terms of size and disk usage.&lt;br /&gt;AH! We have created our first relation between the persons table and the states table.&lt;br /&gt;The above can be done in different situations, and tables can have multiple relations. In the above scenario, we could create a cities table (if it makes sense). However, if you imagine a complex database, you can definitely imagine many situations where a relation is needed.&lt;br /&gt;That is the solid idea on which we must build our databases. That should always be our first rule, written in stone on our desk. Every time we create a new table we must think about how we can split it, how we can create relations and how we can save CPU and disk usage with relations.&lt;br /&gt;
&lt;br /&gt;
Next time the second part of the article.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/6145059449501238441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/relational-databases-some-simple-rules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6145059449501238441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6145059449501238441'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/relational-databases-some-simple-rules.html' title='Relational databases: some simple rules (part 1)'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-515895370185628623</id><published>2013-03-21T07:00:00.000+01:00</published><updated>2013-03-21T07:00:05.846+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="border-image"/><category scheme="http://www.blogger.com/atom/ns#" term="css3"/><title type='text'>CSS3: border-image</title><content type='html'>With &lt;b&gt;CSS3 &lt;/b&gt;we can use &lt;b&gt;images &lt;/b&gt;as &lt;b&gt;border &lt;/b&gt;of an element. Apart from using the normal border styles already available in CSS, we can now make our web pages more colourful and attractive (if you really like colours and shapes!).&lt;br /&gt;
Just to go directly to the core, we can use the following style for, let&#39;s say, all divs in a document:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
div&lt;br /&gt;{&lt;br /&gt;-webkit-border-image:url(myborder.png) 30 30 round;&lt;br /&gt;-o-border-image:url(myborder.png) 30 30 round;&lt;br /&gt;border-image:url(myborder.png) 30 30 round;&lt;br /&gt;}&lt;/code&gt;&lt;/blockquote&gt;
The border-image property is in fact a shorthand property. As you can see from the above example, we are using different values which are:&lt;br /&gt;
1) border-image-source which is the path to our image;&lt;br /&gt;
2) border-image-slice which is the inward offsets of the image;&lt;br /&gt;
3) border-image-width which is the widths of the image;&lt;br /&gt;
4) border-image-outset which defines the portion of the image that goes beyond the box;&lt;br /&gt;
5) border-image-repeat which sets the way the image will be repeated.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
Before exploring further the above, we should consider that all the values, if omitted, are set to the default values. Apart from the first (the source) which can&#39;t be obviously omitted, the default values are - in order: 100%, 1, 0, stretch.&lt;br /&gt;
&lt;br /&gt;
The border-image-source property has a simple syntax:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
border-image-source:url(pathToTheBorderImage.png);&lt;/code&gt;&lt;/blockquote&gt;
If the image is not found, or it is set to none (which is absurd in any case), the border-style property is used. That means we can use the border-style as fallback for not supporting browsers (see below).&lt;br /&gt;
&lt;br /&gt;
The border-image-slice property has values as a percentage, number or &quot;fill&quot;. Percentages, relative to the image itself, represents the width for horizontal offsets and the height for vertical offsets. When using numbers we are referring to pixels in a raster image and vector coordinates in a vector image. &quot;Fill&quot; preserves the middle part of the image.&lt;br /&gt;
I know it seems quite complicated and I believe it is. We should consider some sort of grid, dividing the image in 9 regions: the 4 corners, the 4 edges and the middle. The middle part is treated as transparent (unless we use &quot;fill&quot;). We are setting values for the other 8 parts of the image. Values follow the rule that if they are omitted they are the same as the previous value.&lt;br /&gt;
&lt;br /&gt;
The border-image-width works the same way as the border-image-slice property. The only difference is in the &quot;fill&quot; value which is &quot;auto&quot; in this case.&lt;br /&gt;
&lt;br /&gt;
Just a note at this point: please follow me to the end of the post and consider the information I&#39;m giving as just... well. information.&lt;br /&gt;
&lt;br /&gt;
The border-image-outset property determines - as said - the number by which the image extends beyond the border box. That is on each side (top, right, bottom and left).&lt;br /&gt;
&lt;br /&gt;
Finally, the border-image-repeat can be set to &quot;stretch&quot; (the image fills the area), &quot;repeat&quot; (the image is tiled) and &quot;round&quot; (the image is tiled but if it doesn&#39;t fill the area, the image is rescaled).&lt;br /&gt;
&lt;br /&gt;
As you can there&#39;s plenty of possible values to be set, which gives us a lot of freedom but here comes the bad news: compatibility!&lt;br /&gt;
&lt;br /&gt;
The 5 different properties listed above are not really working on any browser to my understanding. The only way to use border-image is to use the shorthand property as described in the first example.&lt;br /&gt;
&lt;br /&gt;
But, my friend, there&#39;s still a quick solution. If you really want to use border-image you can always rely on a border-image generator like this &lt;a href=&quot;http://border-image.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;one&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
And in the future when we will have full support, we might need to fully understand how to properly use all the available properties to create interesting borders.&lt;br /&gt;
&lt;br /&gt;
Please share your experience on the matter by using the comments section below!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/515895370185628623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/css3-border-image.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/515895370185628623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/515895370185628623'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/css3-border-image.html' title='CSS3: border-image'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8904384600190767135</id><published>2013-03-19T07:00:00.000+01:00</published><updated>2013-03-19T07:00:03.499+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="conditional statement"/><category scheme="http://www.blogger.com/atom/ns#" term="else"/><category scheme="http://www.blogger.com/atom/ns#" term="elseif"/><category scheme="http://www.blogger.com/atom/ns#" term="if"/><category scheme="http://www.blogger.com/atom/ns#" term="then"/><category scheme="http://www.blogger.com/atom/ns#" term="VBScript"/><title type='text'>ASP: conditional statements with If...Then...Else...ElseIf</title><content type='html'>In &lt;b&gt;ASP &lt;/b&gt;we can use &lt;b&gt;conditional statements&lt;/b&gt; in different ways. The basic syntax we are used to, is &lt;b&gt;If&lt;/b&gt; ... &lt;b&gt;Then&lt;/b&gt; ... &lt;b&gt;Else &lt;/b&gt;... End, however we will see that there are some interesting things about it.&lt;br /&gt;
&lt;br /&gt;
First of all let&#39;s consider a simple conditional statement in ASP. As you already know, we do not use any brackets or parenthesis. A basic example could be:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;Dim numVar&lt;br /&gt;numVar = 5&lt;br /&gt;If numVar = 5 then&lt;br /&gt;&amp;nbsp; response.write(&quot;The variable numVar is 5&quot;)&lt;br /&gt;End if&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;The above is just checking if numVar is equal to 5. If so, the text is output (&quot;The variable numVar is 5&quot;). Otherwise, nothing happens. It&#39;s obvious that the example will always output something, because 5 is always equal to 5.&lt;br /&gt;
Moreover, we must remember that in ASP we cannot set a value of a variable inside the conditional statement. The use of the operators (like &quot;=&quot;) inside a conditional statement is always used only to compare two values, variables and values or variables and variables.&lt;br /&gt;
&lt;br /&gt;
If we need to create a more complex conditional statement, we can introduce &quot;Else&quot;. That means we can check if a condition is met, but if it&#39;s not we can decide what to do. What stays after the &quot;Else&quot; is what&#39;s happening if the first condition is false.&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;Dim numVar&lt;br /&gt;numVar = 5&lt;br /&gt;If numVar = 6 then&lt;br /&gt;&amp;nbsp; response.write(&quot;The variable numVar is 6&quot;)&lt;br /&gt;Else&lt;br /&gt;&amp;nbsp; response.write(&quot;The variable numVar is &quot; &amp;amp; numVar)&lt;br /&gt;End if&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The first condition is clearly false and the first response.write will be ignored, while the second will be executed.&lt;br /&gt;
&lt;br /&gt;
We can create nested conditional statements, but believe me, in many situations, they can create strong headaches. We normally prefer to use a conditional statement at the time, however there&#39;s something more.&lt;br /&gt;
&lt;br /&gt;
We can check multiple conditions using &quot;ElseIf&quot; which is a new conditional statement, depending on the first conditional statement.&lt;br /&gt;
Let&#39;s try to simplify it by using simple words:&lt;br /&gt;
&lt;i&gt;If &lt;/i&gt;something is true &lt;i&gt;Then&lt;/i&gt; do this &lt;i&gt;ElseIf&lt;/i&gt; second something is true &lt;i&gt;Then&lt;/i&gt; do this etc. Obviously we cannot use an &quot;ElseIf&quot; not &quot;contained&quot; in an If statement.&lt;br /&gt;
Let&#39;s see an example:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;Dim numVar&lt;br /&gt;numVar = 5&lt;br /&gt;If numVar = 6 Then&lt;br /&gt;&amp;nbsp; response.write(&quot;The variable numVar is 6&quot;)&lt;br /&gt;ElseIf numVar = 5&lt;br /&gt;&amp;nbsp; response.write(&quot;The variable numVar is 5&quot;)&lt;br /&gt;Else&lt;br /&gt;&amp;nbsp; response.write(&quot;The variable numVar is &quot; &amp;amp; numVar)&lt;br /&gt;End if&lt;br /&gt;%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
As you may notice, the above code will always output &quot;The variable numvVr is 5&quot;.&lt;br /&gt;
&lt;br /&gt;
I think that a good use of ElseIf can be very beneficial to our code, especially when we need to check different variables for multiple values.&lt;br /&gt;
If you have used it in special and interesting ways, please share your thoughts in the comments section below.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8904384600190767135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/asp-conditional-statements-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8904384600190767135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8904384600190767135'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/asp-conditional-statements-with.html' title='ASP: conditional statements with If...Then...Else...ElseIf'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1188736095685718245</id><published>2013-03-14T07:00:00.000+01:00</published><updated>2013-03-14T07:00:05.308+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="geolocation"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><title type='text'>HTML5: geolocation</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjArCPann-AnsdUd8RwcJ-xgHiQGFZUwiJPKUcmB0SIn4a935QcfTp0Yn5mfGzBLijc4txETx1PEYn6g-DjsBboLDZEs4WTVcc-ebCgZebGiVmRlcec6XQj8pOBKnzEfOo1OtLa1Hgx8aY/s200/HTML5_Badge_64.png&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot; width=&quot;150&quot; /&gt;&lt;/div&gt;
With&amp;nbsp;&lt;b&gt;HTML5&lt;/b&gt; is now possible to use the target browser in order to determine the &lt;b&gt;location&lt;/b&gt; from which the user is accessing the web. It is not, as you may understand, a GPS location (unless the user is surfing from a GPS capable device), but it can be quite interesting in some cases where special services are supplied on a web page.&lt;br /&gt;
&lt;br /&gt;
How can we develop a geolocation service on our web page?&lt;br /&gt;
&lt;br /&gt;
Well, first of all try and see the final effect: go &lt;a href=&quot;http://html5demos.com/geo&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;here&lt;/a&gt; and enjoy. After that, please get back on &lt;i&gt;the web thought&lt;/i&gt;...&lt;br /&gt;
&lt;br /&gt;
First of all let me say that all location services on the target browser must be granted by the user. As you may have noticed by visiting the above live example, the browser has asked you permission for the use of location services (unless you&#39;ve granted permanent access to your location).&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;But how is it working?&lt;br /&gt;
Well, this time is not just a line of code. In fact, we need to use a little snippet. Everything&#39;s working around the geolocation API.&lt;br /&gt;
Let&#39;s see a complete example:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;button onclick=&quot;getLoc()&quot;&amp;gt;Where are you?&amp;lt;/button&amp;gt;&lt;br /&gt;&amp;lt;div id=&quot;errMsg&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;div id=&quot;map&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;script&amp;gt;&lt;br /&gt;var x=document.getElementById(&quot;errMsg&quot;);&lt;br /&gt;function getLoc()&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; if (navigator.geolocation)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; navigator.geolocation.getCurrentPosition(showPos,showErr);&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; else{x.innerHTML=&quot;Geolocation not supported by this browser.&quot;;}&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;function showPos(position)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; var latlon=position.coords.latitude+&quot;,&quot;+position.coords.longitude;&lt;br /&gt;&amp;nbsp; var img_url=&quot;http://maps.googleapis.com/maps/api/staticmap?center=&quot;&lt;br /&gt;&amp;nbsp; +latlon+&quot;&amp;amp;zoom=14&amp;amp;size=400x300&amp;amp;sensor=false&quot;;&lt;br /&gt;&amp;nbsp; document.getElementById(&quot;map&quot;).innerHTML=&quot;&amp;lt;img src=&#39;&quot;+img_url+&quot;&#39;&amp;gt;&quot;;&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;function showErr(error)&lt;br /&gt;&amp;nbsp; {&lt;br /&gt;&amp;nbsp; switch(error.code)&lt;br /&gt;&amp;nbsp; &amp;nbsp; {&lt;br /&gt;&amp;nbsp; &amp;nbsp; case error.PERMISSION_DENIED:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x.innerHTML=&quot;User denied the request&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; case error.POSITION_UNAVAILABLE:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x.innerHTML=&quot;Location information not available&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; case error.TIMEOUT:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x.innerHTML=&quot;Request timeout&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; case error.UNKNOWN_ERROR:&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; x.innerHTML=&quot;Unknown error&quot;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; break;&lt;br /&gt;&amp;nbsp; &amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The script itself is quite easy to understand, but I will here explain some important things:&lt;br /&gt;
1) the two divs at the beginning of the above snippet are used to show possible error (errMsg) and the resulting map (map);&lt;br /&gt;
2) the getLoc() function is used to determine the geolocation;&lt;br /&gt;
3) the showPos() function is actually showing the map by inserting it in the div with id=&quot;map&quot;;&lt;br /&gt;
4) the showErr() function is replacing the innerHTML of the div with id=&quot;errMsg&quot; with a possible error message (something went wrong).&lt;br /&gt;
&lt;br /&gt;
If you spend a little time on studying the above script, everything will be quite clear.&lt;br /&gt;
What about compatibility? Well, all the latest version of all the available browser are supporting geolocation. Good news eh?&lt;br /&gt;
&lt;br /&gt;
If you like, you can share your thoughts by using the comments section below. If you don&#39;t want... well.. don&#39;t.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1188736095685718245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/html5-geolocation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1188736095685718245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1188736095685718245'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/html5-geolocation.html' title='HTML5: geolocation'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjArCPann-AnsdUd8RwcJ-xgHiQGFZUwiJPKUcmB0SIn4a935QcfTp0Yn5mfGzBLijc4txETx1PEYn6g-DjsBboLDZEs4WTVcc-ebCgZebGiVmRlcec6XQj8pOBKnzEfOo1OtLa1Hgx8aY/s72-c/HTML5_Badge_64.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8843713588470660358</id><published>2013-03-12T07:00:00.000+01:00</published><updated>2013-03-12T07:00:06.961+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="cursor"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><title type='text'>CSS: cursor</title><content type='html'>As you surely already know we can change the &lt;b&gt;cursor &lt;/b&gt;type using &lt;b&gt;CSS&lt;/b&gt;.&lt;br /&gt;
They way we do it is very simple. It is enough to use the cursor property and apply it to any element in our web page:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;.myDiv {&lt;br /&gt;&amp;nbsp; &amp;nbsp;cursor: crosshair;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;br /&gt;&amp;lt;div class=&quot;myDiv&quot;&amp;gt;The cursor here has a crosshair shape&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
What are the different option we have?&lt;br /&gt;
The answer after the break :-)&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
In order to see the different effects, please move your cursor on the appropriate cursor type in the following table.
&lt;br /&gt;
&lt;style&gt;
td {
border: thin solid #FFFFFF;
}
.a { cursor: auto;}
.b { cursor: crosshair;}
.c { cursor: default;}
.d { cursor: e-resize;}
.e { cursor: help;}
.f { cursor: move;}
.g { cursor: n-resize;}
.h { cursor: ne-resize;}
.i { cursor: nw-resize;}
.l { cursor: pointer;}
.m { cursor: progress;}
.n { cursor: s-resize;}
.o { cursor: se-resize;}
.p { cursor: sw-resize;}
.q { cursor: text;}
.r { cursor: w-resize;}
.s { cursor: wait;}
.t { cursor: inherit;}
&lt;/style&gt;

&lt;br /&gt;
&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;i&gt;URL&lt;/i&gt; URLs to custom cursors. The live test won&#39;t work obviously.&lt;/td&gt;
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;a&quot;&gt;auto&lt;/td&gt;             
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;b&quot;&gt;crosshair&lt;/td&gt;  
  &lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;c&quot;&gt;default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;d&quot;&gt;e-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;e&quot;&gt;help&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;f&quot;&gt;move&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;g&quot;&gt;n-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;h&quot;&gt;ne-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;i&quot;&gt;nw-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;l&quot;&gt;pointer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;m&quot;&gt;progress&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;n&quot;&gt;s-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;o&quot;&gt;se-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;p&quot;&gt;sw-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;q&quot;&gt;text&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;r&quot;&gt;w-resize&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;s&quot;&gt;wait&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
    &lt;td class=&quot;t&quot;&gt;inherit&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8843713588470660358/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/css-cursor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8843713588470660358'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8843713588470660358'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/css-cursor.html' title='CSS: cursor'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1262336867007569041</id><published>2013-03-07T07:00:00.000+01:00</published><updated>2013-03-07T07:00:01.078+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="href"/><category scheme="http://www.blogger.com/atom/ns#" term="HTML5"/><category scheme="http://www.blogger.com/atom/ns#" term="skype"/><category scheme="http://www.blogger.com/atom/ns#" term="telephone"/><category scheme="http://www.blogger.com/atom/ns#" term="telephone number"/><title type='text'>HTML5: telephone numbers on web pages</title><content type='html'>Every day on TV we hear news saying that most of the people in the world is surfing the web using a mobile device. You are probably reading this very article with your iPhone or Galaxy, or maybe using your favourite tablet.&lt;br /&gt;
As many of the above mobile devices are actually capable of making phone calls, we can insert &lt;b&gt;telephone numbers&lt;/b&gt; on web page and make them &lt;b&gt;clickable&lt;/b&gt;, so that any mobile user will be able to use the link to call the shown number.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
The way to do it is quite simple. In fact we can use a normal &amp;lt;a&amp;gt; tag with the&amp;nbsp;&lt;i&gt;tel &lt;/i&gt;protocol:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;tel:+XX0123456789&quot;&amp;gt;Click to Call +XX0123456789&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Consider that instead of XX we need to put the country code (for example 39 for Italy). That is because our web page will be seen by people all over the world and not only from our country.&lt;br /&gt;
&lt;br /&gt;
At the same time it is possible to pause the dialling by inserting&amp;nbsp;&lt;i&gt;p&lt;/i&gt; characters (each &lt;i&gt;p&lt;/i&gt; a delay of one second). We can use &lt;i&gt;w&lt;/i&gt; characters when we need to wait for a tone.&lt;br /&gt;
&lt;br /&gt;
When we are browsing the page from a desktop computer, the link will not appear as clickable, unless the pc itself is ready to make phone calls through specific software.&lt;br /&gt;
&lt;br /&gt;
As we use the &lt;i&gt;tel &lt;/i&gt;protocol, we can use the &lt;i&gt;fax&lt;/i&gt; protocol for fax numbers.&lt;br /&gt;
And last but not least, Skype uses the &lt;i&gt;callto &lt;/i&gt;protocol, so we should be careful and use a way to detect the user agent and propose one or the other protocol according to the user device.&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1262336867007569041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/html5-telephone-numbers-on-web-pages.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1262336867007569041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1262336867007569041'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/html5-telephone-numbers-on-web-pages.html' title='HTML5: telephone numbers on web pages'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1130753782291158153</id><published>2013-03-05T07:00:00.000+01:00</published><updated>2013-03-05T07:00:04.635+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="compare table"/><category scheme="http://www.blogger.com/atom/ns#" term="insert"/><category scheme="http://www.blogger.com/atom/ns#" term="sql query"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><title type='text'>SQL Server: compare tables</title><content type='html'>When we import, export or synchronise tables, it&#39;s a hard job if we have many records. &lt;br /&gt;
In the past, I&#39;ve found some difficulties when I need to &lt;b&gt;compare&lt;/b&gt; two tables in &lt;b&gt;SQL Server&lt;/b&gt;.&lt;br /&gt;
The tables contained different records and I needed to consolidate them in the first table.&lt;br /&gt;
The first thing I wanted to do was to actually see which were the differences: I needed a list of records in order to understand the situation.&lt;br /&gt;
I&#39;ve found a good solution for that, and let me say, a quite unexpected solution indeed.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
The UNION operator works quite well if we need to compare two tables. It&#39;s quick and handles NULL values, while a join clause or a WHERE condition don&#39;t.&lt;br /&gt;
Assume we have two tables and we need to get all differences in both. The magic trick I&#39;ve found is to GROUP the union query on all columns and count all columns. The count is working because for any not completely matched record in any GROUP BY clause column, the COUNT(*) will be 1. Exactly what we are looking for.&lt;br /&gt;
&lt;br /&gt;
Ok, now let&#39;s see an example: two tables (tabA and tabB) containing three columns (ID, Col1 and Col2).&lt;br /&gt;
The UNION query will be:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT MIN(TableName) as TableName, ID, Col1, Col2&lt;br /&gt;FROM&lt;br /&gt;(&lt;br /&gt;&amp;nbsp; SELECT &#39;tabA&#39; as TableName, tabA.ID, tabA.col1, tabA.col2&lt;br /&gt;&amp;nbsp; FROM tabA&lt;br /&gt;&amp;nbsp; UNION ALL&lt;br /&gt;&amp;nbsp; SELECT &#39;tabB&#39; as TableName, tabB.ID, tabB.col1, tabB.col2&lt;br /&gt;&amp;nbsp; FROM tabB&lt;br /&gt;) tmp&lt;br /&gt;GROUP BY ID, col1, col2&lt;br /&gt;HAVING COUNT(*) = 1&lt;br /&gt;ORDER BY ID&lt;/code&gt;&lt;/blockquote&gt;
The query will return all records from one table that don&#39;t completely match in the other. Moreover, it returns all records that don&#39;t exist in one of the two tables.&lt;br /&gt;
Just to be clear, the query returns records that&lt;br /&gt;
1) are not present in tabA, but are present in tabB;&lt;br /&gt;
2) are present in tabA, but are not present in tabB;&lt;br /&gt;
3) all rows that do not completely match all columns.&lt;br /&gt;
&lt;br /&gt;
The above trick is quite different from a way to compare two table and insert the missing data from one table to another.&lt;br /&gt;
In this case we need to consider an example.&lt;br /&gt;
Two tables: tabA and tabB. Each table has two columns: ID and name.&lt;br /&gt;
We need to add to tabA, all the missing names that are in table tabB. That means, compare tabA with tabB, if the record exists in tabA, do nothing; if the record doesn&#39;t exist in tabA, add it.&lt;br /&gt;
The query will be:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
INSERT INTO tabA (name)&lt;br /&gt;SELECT name&lt;br /&gt;FROM tabB&lt;br /&gt;WHERE name NOT IN (SELECT name FROM tabA)&lt;/code&gt;&lt;/blockquote&gt;
And that&#39;s it.&lt;br /&gt;
&lt;br /&gt;
I hope you&#39;ve found the above interesting enough. Just drop a line in the comments section below.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1130753782291158153/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/03/sql-server-compare-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1130753782291158153'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1130753782291158153'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/03/sql-server-compare-tables.html' title='SQL Server: compare tables'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4815149803716760291</id><published>2013-02-28T07:00:00.000+01:00</published><updated>2013-02-28T07:00:01.436+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".js"/><category scheme="http://www.blogger.com/atom/ns#" term="embed JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="external file"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><title type='text'>JavaScript: how to use external files</title><content type='html'>As we already know, because we saw it in the past here on &lt;i&gt;the web thought&lt;/i&gt; or elsewhere, we can use &lt;b&gt;JavaScript &lt;/b&gt;snippet by placing the code in the head and/or the body of our documents.&lt;br /&gt;
However, it&#39;s good practise to create &lt;b&gt;external JavaScript files&lt;/b&gt;, especially when we use standard functions all over our web site.&lt;br /&gt;
&lt;br /&gt;
In this short article, we are going to see how to do it.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Creating our own JavaScript library is not that difficult. &lt;br /&gt;
What we basically want to do it here is: create an external .js file, embed it in our page and finally use a function from the external file.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s create the .js file.&lt;br /&gt;
To do so, we create a new file in the root of our web site. Like creating a new txt file, but with a different extension; we name the new file &lt;i&gt;myJs.js&lt;/i&gt;. Open it with your favourite web editor and place the following code inside it:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
function popUp() {&lt;br /&gt;
alert(&quot;Hello from the web thought&quot;)&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;
Ok. Save and close the &lt;i&gt;myJs.js&lt;/i&gt; file.&lt;br /&gt;
&lt;br /&gt;
Now open a new html document and place the following snippet in the head section:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script src=&quot;myJs.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
In the body of the document, just insert the following snippet:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;input type=&quot;button&quot; onclick=&quot;popUp()&quot; value=&quot;Click here!&quot;&amp;gt;&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;
Just open the newly created html file with your favourite browser. The effect will be that when we click the button, an alert will popoup as expected.&lt;br /&gt;
&lt;br /&gt;
The magic is basically done by embedding the &lt;i&gt;popUp()&lt;/i&gt; function inside the web document by using the src=&quot;fileName&quot; in the head of our document itself.&lt;br /&gt;
&lt;br /&gt;
Just remember:&lt;br /&gt;
1) we use external files when we need to use specific functions all over the web site. Doing so we don&#39;t need to write the functions in every document;&lt;br /&gt;
2) we do not use the &amp;lt;script&amp;gt; tag inside the .js file: we just put the functions one after the other;&lt;br /&gt;
3) we can use external .js files to be placed in the head of our documents and even to be placed in the body of our documents (the script will be run when the page loads).&lt;br /&gt;
&lt;br /&gt;
And that is all for today.&lt;br /&gt;
Hoping that I will find the time to write again next week...&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4815149803716760291/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/javascript-how-to-use-external-files.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4815149803716760291'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4815149803716760291'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/javascript-how-to-use-external-files.html' title='JavaScript: how to use external files'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2470075322513722714</id><published>2013-02-26T07:00:00.000+01:00</published><updated>2013-02-26T07:00:05.195+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="menu"/><category scheme="http://www.blogger.com/atom/ns#" term="plug-in"/><title type='text'>jQuery: menu plugin and ideas</title><content type='html'>If you want to create menus using &lt;b&gt;jQuery&lt;/b&gt;, here is a good list of &lt;b&gt;plugins and ideas &lt;/b&gt;to consider.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://dipi-graphics.com/labs/6/NavDock-jQuery-Plugin.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;NavDock jQuery Plugin 1.2&lt;/a&gt;&lt;br /&gt;
&quot;NavDock is a jQuery plugin that transforms your menu into a dock style menu.&quot;&amp;nbsp;  &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.tn34.de/projekte/downloads/jQuery.tn34.facets.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery.tn34.facets&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://rezoner.net/labs/jorbital/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jOrbital menu&lt;/a&gt;&lt;br /&gt;
&quot;Group objects with similar functionality into one button. 
 Save space and give users more interaction. Move your mouse over the share button to see what I mean.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.myjqueryplugins.com/jquery-plugin/jmenu&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jMenu : Horizontal navigations with unlimited dropdown sub-menus&lt;/a&gt;&lt;br /&gt;
&quot;&lt;b&gt;Menu is a jQuery plugin&lt;/b&gt; that enables us to create horizontal navigations with unlimited sub-menus.
&lt;br /&gt;
Besides jQuery, it also requires jQuery UI and supports all the effects of this library (like fadeIn or slideDown).&lt;br /&gt;
The markup of the menu is pretty clean as it makes use of nested lists.&lt;br /&gt;
The look and feel of the output is set in a CSS file so updating it without touching the JS code is possible.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://codecanyon.net/item/drop-menu/81289?ref=1stwebdesigner&amp;amp;ref=1stwebdesigner&amp;amp;clickthrough_id=111673082&amp;amp;redirect_back=true&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Drop Menu&lt;/a&gt;&lt;br /&gt;
&quot;With this script you can make nice and interactive drop down menus. The 
advantage of this script is that it not only gives you the ability to 
make list drop down menu. You can also use a div as drop down element.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.htmldrive.net/items/show/199/jQuery-and-CSS3-Awesome-Slide-Down-Box-Menu.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery and CSS3 Awesome Slide Down Box Menu&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&quot;we will create a unique sliding box navigation. The idea is to make a 
box with the menu item slide out, while a thumbnail pops up. We will 
also include a submenu box with further links for some of the menu 
items. The submenu will slide to the left or to the right depending on 
which menu item we are hovering.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://designindevelopment.com/css/apple-navigation-with-css3/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Apple Navigation with CSS3&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&quot;Apple is known for very clean design and if you have been to their 
website in the last few years you’ve seen their primary navigation. It’s
 a staple of the apple website and today I wanted to take a crack at 
recreating the Apple navigation using CSS3 techniques.&quot; &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/2470075322513722714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/jquery-menu-plugin-and-ideas.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2470075322513722714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2470075322513722714'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/jquery-menu-plugin-and-ideas.html' title='jQuery: menu plugin and ideas'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3029795848749812518</id><published>2013-02-21T07:00:00.000+01:00</published><updated>2013-02-21T07:00:03.003+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="layers"/><category scheme="http://www.blogger.com/atom/ns#" term="overlapping"/><category scheme="http://www.blogger.com/atom/ns#" term="z-index"/><title type='text'>CSS: Layers</title><content type='html'>We can use &lt;b&gt;CSS &lt;/b&gt;to &lt;b&gt;overlap &lt;/b&gt;elements on a page. We are talking about putting one element on top of another.&lt;br /&gt;
To do so we can define the &lt;b&gt;z-index&lt;/b&gt;. Something like:
&lt;style&gt;
.a {
position: relative; 
top: 30px;
left: 5px;
z-index: 2;
background-color: #330000;
}
.b {  
position: relative; 
z-index: 1; 
background-color: #FF0000;
}
&lt;/style&gt;
&lt;br /&gt;
&lt;div class=&quot;a&quot;&gt;
Maecenas vel commodo magna. Aliquam facilisis, erat eu rhoncus elementum, elit eros venenatis risus, vitae tincidunt dui lorem a tellus. Integer non magna a mi euismod ultricies. Aliquam sit amet tortor est. Vivamus sollicitudin neque et justo vestibulum dignissim.
&lt;/div&gt;
&lt;div class=&quot;b&quot;&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam dictum tincidunt turpis vitae rhoncus. Donec massa enim, fringilla nec vestibulum at, congue hendrerit dolor. Integer rutrum volutpat condimentum. In consequat ornare erat, ac condimentum diam molestie ac. Nullam ligula lacus, posuere vel rhoncus at, ullamcorper eget lacus. Etiam non nisi urna. Vivamus elementum orci sed diam rhoncus vitae pharetra dolor commodo. Vestibulum varius cursus orci nec ullamcorper. Curabitur nulla sapien, laoreet eu convallis ac, luctus in tellus.
 &lt;/div&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;It&#39;s very simple and the effect can be interesting in many situations.&lt;br /&gt;
&lt;br /&gt;
The way it is done: two divs with different classes (a and b).&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div class=&quot;a&quot;&amp;gt;&lt;br /&gt;
Maecenas vel commodo magna. Aliquam facilisis, erat eu rhoncus elementum, elit eros venenatis risus, vitae tincidunt dui lorem a tellus. Integer non magna a mi euismod ultricies. Aliquam sit amet tortor est. Vivamus sollicitudin neque et justo vestibulum dignissim.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;b&quot;&amp;gt;&lt;br /&gt;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam dictum tincidunt turpis vitae rhoncus. Donec massa enim, fringilla nec vestibulum at, congue hendrerit dolor. Integer rutrum volutpat condimentum. In consequat ornare erat, ac condimentum diam molestie ac. Nullam ligula lacus, posuere vel rhoncus at, ullamcorper eget lacus. Etiam non nisi urna. Vivamus elementum orci sed diam rhoncus vitae pharetra dolor commodo. Vestibulum varius cursus orci nec ullamcorper. Curabitur nulla sapien, laoreet eu convallis ac, luctus in tellus.&lt;br /&gt;
&amp;nbsp;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Then we need to style those two divs:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;style&amp;gt;&lt;br /&gt;.a {&lt;br /&gt;position: relative; &lt;br /&gt;top: 30px;&lt;br /&gt;left: 5px;&lt;br /&gt;z-index: 2;&lt;br /&gt;background-color: #330000;&lt;br /&gt;}&lt;br /&gt;.b {&amp;nbsp; &lt;br /&gt;position: relative; &lt;br /&gt;z-index: 1; &lt;br /&gt;background-color: #FF0000;&lt;br /&gt;}&lt;br /&gt;&amp;lt;/style&amp;gt;&lt;/code&gt; &lt;/blockquote&gt;
The b div will stay on top of the a div because of the z-index.&lt;br /&gt;
Basically when we need overlapping elements, the z-index property can be set to 
determine the order in which elements overlaps. The greater the 
z-index value the more the element will be placed in front. If no 
z-index value is set, the last positioned element in the normal html 
flow will be positioned in front.
 &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/3029795848749812518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/css-layers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/3029795848749812518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/3029795848749812518'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/css-layers.html' title='CSS: Layers'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8480149891218448199</id><published>2013-02-19T07:00:00.000+01:00</published><updated>2013-02-19T07:00:03.748+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="cdate"/><category scheme="http://www.blogger.com/atom/ns#" term="isdate"/><category scheme="http://www.blogger.com/atom/ns#" term="VBScript"/><title type='text'>ASP: CDate</title><content type='html'>&lt;b&gt;CDate &lt;/b&gt;is an &lt;b&gt;ASP &lt;/b&gt;function that converts a valid date and time string to a Date Type value and returns it.&lt;br /&gt;
&lt;br /&gt;
Because of the above we need to use another ASP function in order to be sure to convert a valid date. The function&#39;s &lt;b&gt;IsDate&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
In the following short post, we are going to see how to use both functions and create a short script that converts a date.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;First of all, let&#39;s talk about the &lt;a href=&quot;http://thewebthought.blogspot.com/2011/04/asp-is-this-date-isdate-function.html&quot; target=&quot;_blank&quot;&gt;IsDate&lt;/a&gt; function. Because it uses the local settings to determine if a date is really a date, we should be careful when using it. For example, if we think about a date containing &quot;April&quot; as month, we should remember that the fourth month is not called &quot;April&quot; in all languages.&lt;br /&gt;
Because of that, remember to verify the language setting of your system.&lt;br /&gt;
&lt;br /&gt;
The CDate function has a simple syntax:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
CDate(Date)&lt;/code&gt;&lt;/blockquote&gt;
where Date is a valid date expression. We can use functions like Date() or Now() as well.&lt;br /&gt;
&lt;br /&gt;
Now, let&#39;s put the two aforementioned functions all together.&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;
Dim myDate, myDateType&lt;br /&gt;
myDate = &quot;April 18, 1920&quot;&lt;br /&gt;
If IsDate(myDate) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myDateType = CDate(myDate)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(myDateType)&lt;br /&gt;
Else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Response.Write(&quot;Bad date formatting!&quot;)&lt;br /&gt;
End If&lt;br /&gt;
%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
which will output:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
18/04/1920&lt;/code&gt;&lt;/blockquote&gt;
or&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
4/18/1920&lt;/code&gt;&lt;/blockquote&gt;
depending on the date and time setting of the hosting system.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8480149891218448199/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/asp-cdate.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8480149891218448199'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8480149891218448199'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/asp-cdate.html' title='ASP: CDate'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1072591612676100436</id><published>2013-02-14T07:00:00.000+01:00</published><updated>2013-02-14T07:00:06.827+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="document.getElementById"/><category scheme="http://www.blogger.com/atom/ns#" term="DOM"/><category scheme="http://www.blogger.com/atom/ns#" term="innerHTML"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="manipulate"/><title type='text'>JavaScript: innerHTML</title><content type='html'>In the following short post, we are going to take advantage of &lt;b&gt;JavaScript &lt;/b&gt;and its &lt;b&gt;innerHTML &lt;/b&gt;method.&lt;br /&gt;
&lt;br /&gt;
Every DOM element can be manipulated using JavaScript. With the use of jQuery we can do great things, but if we need to do something more basic, it is probably better to use JavaScript directly, without the help of the aforementioned great library.&lt;br /&gt;
&lt;br /&gt;
We can manipulate any DOM element using its id as selector together with &lt;a href=&quot;http://thewebthought.blogspot.com/2013/01/html-ids-and-classes.html&quot; target=&quot;_blank&quot;&gt;document.getElementById&lt;/a&gt;. The advantage is that we can manipulate the inner html part of the element.&lt;br /&gt;
Let&#39;s see some example.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;First example&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Try the following example... &lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
function changeIH(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;theElem&#39;).innerHTML = &#39;... enjoy yourself&#39;;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;div id=&#39;theElem&#39;&amp;gt;Welcome to the Web Thought...&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;input type=&#39;button&#39; onclick=&#39;changeIH()&#39; value=&#39;What&#39;s next?&#39;/&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Should I explain it? It looks quite simple... Try it for yourself and see how by clicking on the button the inner HTML of the div is changed.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Second example&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
This is different. Let&#39;s change the text according to a user input:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
function changeIH(){&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var userText = document.getElementById(&#39;userText&#39;).value;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; document.getElementById(&#39;theElem&#39;).innerHTML = userText;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;lt;div id=&#39;theElem&#39;&amp;gt;Chose a new text...&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;input type=&#39;text&#39; id=&#39;userText&#39; value=&#39;New Text&#39; /&amp;gt;&lt;br /&gt;
&amp;lt;input type=&#39;button&#39; onclick=&#39;changeIH()&#39; value=&#39;Submit&#39;/&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Fill in the input box and press the button: the text &quot;Chose a new text...&quot; is replaced with the new text.&lt;br /&gt;
As you can see we can really do anything we want and manipulate the HTML inside a specific tag.&lt;br /&gt;
&lt;br /&gt;
I could go on with many more example however I think we got to the point.&lt;br /&gt;
I leave the rest to your imagination.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1072591612676100436/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/javascript-innerhtml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1072591612676100436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1072591612676100436'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/javascript-innerhtml.html' title='JavaScript: innerHTML'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8008778014263770194</id><published>2013-02-12T07:00:00.000+01:00</published><updated>2013-02-12T07:00:06.459+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="display"/><category scheme="http://www.blogger.com/atom/ns#" term="display:none"/><category scheme="http://www.blogger.com/atom/ns#" term="hidden"/><category scheme="http://www.blogger.com/atom/ns#" term="hide"/><category scheme="http://www.blogger.com/atom/ns#" term="visibility"/><category scheme="http://www.blogger.com/atom/ns#" term="visibility:hidden"/><title type='text'>CSS: visibility: hidden vs display: none</title><content type='html'>Writing for the web thought becomes more complicated everyday. It goes down to the fact that I&#39;ve wrote more than 380 posts since July 2010 and thinking about new things to talk about is getting harder and harder. However, some times a short conversation with a friend or a colleague might ignite a sparkle and might give me new ideas for a short post like the following.&lt;br /&gt;
&lt;br /&gt;
I was in fact talking with a friend when it came to my mind that the difference between &lt;b&gt;visibility &lt;/b&gt;and &lt;b&gt;display&lt;/b&gt; properties in &lt;b&gt;CSS &lt;/b&gt;is some times completely missed. Specifically, the difference between &lt;i&gt;visibility: hidden&lt;/i&gt; and &lt;i&gt;display: none&lt;/i&gt;.&lt;br /&gt;
The point is not that complicated, so in just a few words we are going to see the difference, and we are going to explore when to use visibility instead of display.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The situation&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We have a DOM element in our page and we want it to &quot;not be shown&quot;. The way we are going to make it invisible, is indeed affecting our whole page.&lt;br /&gt;
Usually, we use two CSS properties: visibility and/or display. But which one is better? Do they have the same effect on the page?&lt;br /&gt;
First thing: there&#39;s no better property. There must be a reason why we have two different properties which do the same thing.&lt;br /&gt;
Second: they apparently do the same thing, but they have different effect on the page.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Visibility: hidden&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We can set visibility to hidden or display. The two values have obviously the opposite effect: the first hides the element, the second makes the element visible.&lt;br /&gt;
The point here is that the element - even when hidden - will always take up space. So, if we consider an element with a specific height and width, it will always take up that space - even when hidden.&lt;br /&gt;
It means that if we have, for example, three elements in a row, and we hide the second, the first and the third won&#39;t get together at all - the space between them will stay the same. The hidden element stays in the normal document flow.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Display: none&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
I&#39;m sure now you know what happens when we use the display properties.&lt;br /&gt;
When we set it to none, the element is someway removed from the document flow and the surrounding elements will collapse, taking the space that was once taken by the hidden element.&lt;br /&gt;
The difference is not that small. It is indeed a big difference, and it heavily affects the document flow.&lt;br /&gt;
&lt;br /&gt;
As you can see it&#39;s quite redundant for me to say when to use one property against the other. It really goes down to what we need. Usually, when we want to make an element disappear, we don&#39;t really want to leave a blank space. In fact, leaving a blank space is often the same as not hiding the element.&lt;br /&gt;
&lt;br /&gt;
I hope you find the post useful, Leave your thought in the comments section below! &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8008778014263770194/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/css-visibility-hidden-vs-display-none.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8008778014263770194'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8008778014263770194'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/css-visibility-hidden-vs-display-none.html' title='CSS: visibility: hidden vs display: none'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7546639616501143506</id><published>2013-02-07T07:00:00.000+01:00</published><updated>2013-02-07T07:00:00.142+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AND"/><category scheme="http://www.blogger.com/atom/ns#" term="operators"/><category scheme="http://www.blogger.com/atom/ns#" term="OR"/><category scheme="http://www.blogger.com/atom/ns#" term="sql query"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><title type='text'>SQL: AND vs OR (operators)</title><content type='html'>In &lt;b&gt;SQL Server&lt;/b&gt; we can use different operators in our queries: &lt;b&gt;AND&lt;/b&gt;, &lt;b&gt;OR&lt;/b&gt;, LIKE, BETWEEN and so on. In this short post we are going to see AND and OR because I&#39;ve noticed that some could get confused by the results obtained when using them.&lt;br /&gt;
&lt;br /&gt;
So, let&#39;s clear the situation a bit, because we really need to know what we are doing!&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;General&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Just to be clear, there&#39;s a big difference between AND and OR, in fact they both return a Boolean data type with a value of TRUE or FALSE, but:&lt;br /&gt;
AND returns TRUE when &lt;i&gt;both&lt;/i&gt; Boolean expressions are TRUE&lt;br /&gt;
OR returns TRUE when &lt;i&gt;either&lt;/i&gt; Boolean expressions are TRUE&lt;br /&gt;
That might sound confusing, but please take note of the difference above as a start.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;AND&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The operator combines two Boolean expressions and returns TRUE when both are TRUE. The operator is always evaluated first: so when we use different operators, AND comes always first. That&#39;s important, because if we use an AND operator together, for example, with an OR operator, AND is always evaluated first. To change that, we need to use parentheses.&lt;br /&gt;
&lt;br /&gt;
In a query when we search records, we use AND when we want both expressions to be true. However we should consider the unexpected. Follow me...&lt;br /&gt;
The result of two TRUE expressions is TRUE. When just one of the two expressions is FALSE, the result is FALSE. When one expression is UNKNOWN: if the second is TRUE we get UNKNOWN; if the second is FALSE we get FALSE; if the second is UNKNOWN we get UNKNOWN.&lt;br /&gt;
&lt;br /&gt;
Ok, I know it&#39;s complicated, but please just spend a few minutes to understand the above because it will save you a lot of time when an operator is not giving the expected result.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;OR&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The OR operator just combines two Boolean operators. It doesn&#39;t matter if just one of the two expressions is TRUE. As said, when we use the OR operator together with an AND operator, the AND operator is evaluated first.&lt;br /&gt;
Again, let&#39;s see the results when we use the OR operator.&lt;br /&gt;
The result of two TRUE expressions is TRUE. That is even if just one expression is TRUE:&lt;br /&gt;
TRUE OR TRUE = TRUE&lt;br /&gt;
TRUE OR FALSE = TRUE&lt;br /&gt;
FALSE OR TRUE = TRUE&lt;br /&gt;
Obviously two FALSE expressions will give us FALSE. If one expression is UNKNOWN, and the second is TRUE, we get TRUE; if the second is FALSE, we get UNKNOWN; and if the second is UNKNOWN we get UNKNOWN.&lt;br /&gt;
&lt;br /&gt;
Please try again to understand the above, because it will really help you when things get confused.&lt;br /&gt;
&lt;br /&gt;
Ok folks, that&#39;s all for today. See you next time...&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/7546639616501143506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/sql-and-vs-or-operators.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/7546639616501143506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/7546639616501143506'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/sql-and-vs-or-operators.html' title='SQL: AND vs OR (operators)'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4084535694226545664</id><published>2013-02-05T07:00:00.000+01:00</published><updated>2013-02-05T07:00:02.378+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS"/><category scheme="http://www.blogger.com/atom/ns#" term="IIS7"/><category scheme="http://www.blogger.com/atom/ns#" term="RegEx"/><category scheme="http://www.blogger.com/atom/ns#" term="regular expression"/><category scheme="http://www.blogger.com/atom/ns#" term="URL"/><category scheme="http://www.blogger.com/atom/ns#" term="URL Rewrite"/><title type='text'>ASP: URL Rewrite and IIS7</title><content type='html'>Following a kind suggestion by a follower, today we are going to see how to use &lt;b&gt;IIS URL Rewrite&lt;/b&gt; 2.0 for IIS 7.&lt;br /&gt;
&lt;br /&gt;
First of all, what&#39;s URL Rewrite? &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&quot;IIS URL Rewrite 2.0 enables Web administrators to create powerful rules 
to implement URLs that are easier for users to remember and easier for 
search engines to find. By using rule templates, rewrite maps, .NET 
providers, and other functionality integrated into IIS Manager, Web 
administrators can easily set up rules to define URL rewriting behavior 
based on HTTP headers, HTTP response or request headers, IIS server 
variables, and even complex programmatic rules. In addition, Web 
administrators can perform redirects, send custom responses, or stop 
HTTP requests based on the logic expressed in the rewrite rules.&quot;&lt;/blockquote&gt;
&lt;br /&gt;
Rest assured, we can use it for a classic &lt;b&gt;ASP&lt;/b&gt; site as well.&lt;br /&gt;
What we need to do is:&lt;br /&gt;
1) install URL Rewrite after downloading it from the &lt;a href=&quot;http://www.iis.net/downloads/microsoft/url-rewrite&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Ms IIS site&lt;/a&gt;;&lt;br /&gt;
2) enable ASP.NET role service on IIS 7; &lt;br /&gt;
3) write a rule &lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
Nothing very complicated. What we will focus on in the following post is how to write appropriate rules in order to change URL. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The use of URL Rewrite is quite simple. We need to open &lt;b&gt;IIS Manager&lt;/b&gt;, select the &lt;b&gt;Default Web Site&lt;/b&gt; and in the Feature View click on &lt;b&gt;URL Rewrite&lt;/b&gt;. At that point, on the right panel we will be able to click on &lt;b&gt;Add Rules&lt;/b&gt; and select &lt;b&gt;Blank rule&lt;/b&gt;... and here starts the magic.&lt;br /&gt;
&lt;br /&gt;
The next panel has all we need to use to set up a new rule.&lt;br /&gt;
First of all give a name to your new rule. After that we fill in the Match URL section. That is where we set what to look for or the URL we want to change.&lt;br /&gt;
&lt;br /&gt;
Remember when we talked about Regular Expressions? No? Well go and see what we discussed on &lt;a href=&quot;http://thewebthought.blogspot.com/2011/12/javascript-validate-forms-with-regular.html&quot; target=&quot;_blank&quot;&gt;this&lt;/a&gt; post. We need to refresh those ideas because we need to use Regular Expressions to fill in the Match URL section.&lt;br /&gt;
For &quot;Requested URL&quot; select &quot;Matches the pattern&quot; and for &quot;Using&quot; select &quot;Regular Expression&quot;. In the pattern filed insert the regular expression used to search for a candidate URL. This is where we create the rule used to match an URL to be changed to something else.&lt;br /&gt;
Some part of our patter are between parentheses which creates capture groups referenced in the &quot;Action&quot; section.&lt;br /&gt;
Now, select &quot;Ignore Case&quot; and go to the Action section.&lt;br /&gt;
Here is where we decide what the rule should do when a match is found. Because we want to rewrite the URL, we select &quot;Rewrite&quot; in the first list box. In the &quot;Action properties&quot; we need to write the way we want the URL to appear. Select &quot;Append query string&quot; and then apply.&lt;br /&gt;
&lt;br /&gt;
As an example, we can suppose that our URL is like:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
http://localhost/article/342/some-article-title&lt;/blockquote&gt;
and we want it to appear as:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
http://localhost/article.aspx?id=342&amp;amp;title=some-article-title&lt;/blockquote&gt;
How?&lt;br /&gt;
It all depends on our RegEx. In order to match the URL we can use something like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
^article/([0-9]+)/([_0-9a-z-]+)&lt;/code&gt;&lt;/blockquote&gt;
as explained on the IIS Ms site.&lt;br /&gt;
In the &quot;Action properties&quot; we can use the following expression:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
article.aspx?id={R:1}&amp;amp;title={R:2}&lt;/code&gt;&lt;/blockquote&gt;
Forget about the .aspx extension. The important thing here is the use of the capture groups (R1 and R2) which are defined in the match pattern (first RegEx above - see the parentheses?).&lt;br /&gt;
&lt;br /&gt;
As you can see it is not very complicated. Or, just to be clear enough, it all depends on RegEx and we all know they are not really easy to understand.&lt;br /&gt;
However, there are many interesting tools on the web that can help us to validate RegEx like &lt;a href=&quot;http://www.gskinner.com/RegExr/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;RegExr&lt;/a&gt;. All we really need to do is understand how Regular Expressions work.&lt;br /&gt;
&lt;br /&gt;
Last but not least, I have to say I&#39;ve never used URL Rewrite, but in order to help our kind reader who ask information about it, I asked some friends who have used and who are still using URL Rewrite: they told me it&#39;s perfectly working and, provided you know RegEx, it is quite easy to set up.&lt;br /&gt;
&lt;br /&gt;
Enjoy and let me know what you think!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4084535694226545664/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/02/asp-url-rewrite-and-iis7.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4084535694226545664'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4084535694226545664'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/02/asp-url-rewrite-and-iis7.html' title='ASP: URL Rewrite and IIS7'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5644477360360214262</id><published>2013-01-31T07:00:00.000+01:00</published><updated>2013-01-31T07:00:16.099+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="chaining"/><category scheme="http://www.blogger.com/atom/ns#" term="DOM"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery: chaining!</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s1600/jq.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;jQuery&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s1600/jq.jpg&quot; title=&quot;jQuery&quot; /&gt;&lt;/a&gt;We should all bless &lt;b&gt;jQuery&lt;/b&gt;. It gives JavaScript a completely new face in terms of usability and easiness.&lt;br /&gt;
Considering the &lt;a href=&quot;http://blog.jquery.com/2013/01/15/jquery-1-9-final-jquery-2-0-beta-migrate-final-released/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;latest news&lt;/a&gt; about version 2.0, jQuery is quite alive and kicking...&lt;br /&gt;
&lt;br /&gt;
I don&#39;t know how many of you know about &lt;b&gt;chaining&lt;/b&gt;, but I think we should all try to understand how and why we should use it while writing jQuery code.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
As a simple example, you know that we can manipulate DOM elements with specific jQuery methods. As beginners, if we want to manipulate an element more than once, we separate each method as follows:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#element&quot;).fadeIn(&#39;fast&#39;);&lt;br /&gt;$(&quot;#element&quot;).fadeOut(&#39;slow&#39;);&lt;br /&gt;$(&quot;#element&quot;).css(&#39;marginRight&#39;, &#39;10px&#39;);&lt;/code&gt;&lt;/blockquote&gt;
However, we can actually chain all those actions together:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#element&quot;).fadeIn(&#39;fast&#39;).fadeOut(&#39;slow&#39;).css(&#39;marginRight&#39;, &#39;10px&#39;);&lt;/code&gt;&lt;/blockquote&gt;
As you can see there&#39;s an immediate benefit: we write less code which means that our document will be smaller in size.&lt;br /&gt;
But that&#39;s not all (and definitely not the most important thing!)&lt;br /&gt;
&lt;br /&gt;
First of all, let me say something important. You may think that using chaining we could end up with unreadable code. That&#39;s not true because jQuery doesn&#39;t care about spaces in code and the above code could be like the following without generating any problem at all:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#element&quot;).fadeIn(&#39;fast&#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .fadeOut(&#39;slow&#39;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .css(&#39;marginRight&#39;, &#39;10px&#39;);&lt;/code&gt;&lt;/blockquote&gt;
The above is surely more readable, but aren&#39;t we missing the &quot;size&quot; advantage?&lt;br /&gt;
Yes, we are, however we are taking another great advantage none the less.&lt;br /&gt;
&lt;br /&gt;
Every time we use jQuery to manipulate an element, we search for the element itself (using the selector) and then we apply the chosen method. That operation takes time.&lt;br /&gt;
Look at the very first example: jQuery searches for the element in each line.&lt;br /&gt;
With chaining the element is searched just once: the code will run faster... no doubt about it!&lt;br /&gt;
&lt;br /&gt;
Ok, ladies and gentlemen, that&#39;s all for today. See you next time. &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5644477360360214262/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/jquery-chaining.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5644477360360214262'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5644477360360214262'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/jquery-chaining.html' title='jQuery: chaining!'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s72-c/jq.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3603235695555105906</id><published>2013-01-29T07:00:00.000+01:00</published><updated>2013-01-29T07:00:00.873+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="automated auto indexing"/><category scheme="http://www.blogger.com/atom/ns#" term="index"/><category scheme="http://www.blogger.com/atom/ns#" term="sql query"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="SSMS"/><category scheme="http://www.blogger.com/atom/ns#" term="sys.index_columns"/><category scheme="http://www.blogger.com/atom/ns#" term="sys.indexes"/><title type='text'>SQL: which columns should have an index</title><content type='html'>In &lt;b&gt;SQL&lt;/b&gt; tables might have primary keys and indexes. The primary key identifies each record. The key must be unique, it can&#39;t be NULL and each table must have just one key.&lt;br /&gt;
&lt;b&gt;Index&lt;/b&gt;es are something different: they are used to speed up the queries on a specific table. That means we absolutely need indexes on large tables which we often query.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;However there&#39;s something we need to take in account: indexed tables are slower to update because the index itself need to be updated as well. Thus, we need to carefully decide which are the columns we want to be indexed.&lt;br /&gt;
&lt;br /&gt;
Deciding which columns should be indexed is not that difficult. Consider your frequently used queries and create index for those columns that are used in WHERE clauses. Obviously it&#39;s a general idea, because if we query a table to get 10% to 20% of the contained records, an index might be useless.&lt;br /&gt;
I suggest to use 1 or 2 indexes in a table: too many of them will definitely slow down your updates.&lt;br /&gt;
&lt;br /&gt;
Generally indexes speed up and optimise queries against a table. However we should not over use them. In that regard, there is an interesting tool I found on the net which will analyse your database and determine possible improvements by suggesting indexes. It&#39;s call &lt;a href=&quot;http://blogs.msdn.com/b/queryoptteam/archive/2006/06/01/613516.aspx&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Automated Auto-Indexing&lt;/a&gt; and it&#39;s worth giving it a try.&lt;br /&gt;
&lt;br /&gt;
We can get all the already created indexes in a database by querying the sys.indexes and the sys.index_columns system tables:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
select * from sys.indexes&lt;br /&gt;&lt;br /&gt;select * from sys.index_columns&lt;/code&gt;&lt;/blockquote&gt;
In addition, I&#39;ve already explained how to create indexes without SSMS in &lt;a href=&quot;http://thewebthought.blogspot.com/2011/07/sql-server-create-database-with-queries.html&quot;&gt;another post&lt;/a&gt; and if you&#39;re interested you can go there and see for yourself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/3603235695555105906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/sql-which-columns-should-have-index.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/3603235695555105906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/3603235695555105906'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/sql-which-columns-should-have-index.html' title='SQL: which columns should have an index'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-3505343801019370631</id><published>2013-01-24T07:00:00.000+01:00</published><updated>2013-01-24T07:00:03.423+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="sql query"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="subquery"/><title type='text'>SQL: subqueries</title><content type='html'>In this short post, I would like to introduce the concept of subqueries in &lt;b&gt;SQL&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDW5WWkEHTFYeg5go02b9vhvar0JC4Mzj6GgHFix8P4z6xrkKhihIav0gl8JbOxnKJPieB-uVICS9o4o2qAXUPSA6aHN6X1e1kJsLhZWe15hoqRvOMVD-AyHLRPENwOoilUqylF_4XMew/s1600/SQL.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDW5WWkEHTFYeg5go02b9vhvar0JC4Mzj6GgHFix8P4z6xrkKhihIav0gl8JbOxnKJPieB-uVICS9o4o2qAXUPSA6aHN6X1e1kJsLhZWe15hoqRvOMVD-AyHLRPENwOoilUqylF_4XMew/s1600/SQL.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
A &lt;b&gt;subquery &lt;/b&gt;is a query statement inside another query statement. As you already know the order in which a statement is processed is quite important. That is a basic rule like in maths: writing something like 2+2*5 is different than writing (2+2)*5. The first operation gives 12, the second 20.&lt;br /&gt;
In SQL the principle is identical.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;In order to explain what I&#39;m saying, let&#39;s try an example.&lt;br /&gt;
Consider we have a table (rankingTable) with a column (rank) with numbers that indicates a ranking. The higher the number, the higher the rank.&lt;br /&gt;
We can get the highest rank with a query like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT MAX(rank) as highestRank&lt;br /&gt;
FROM rankingTable&lt;/code&gt;&lt;/blockquote&gt;
Now we can use the above query and use it in a WHERE clause:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT *&lt;br /&gt;
FROM rankingTable&lt;br /&gt;
WHERE rank = (SELECT MAX(rank) FROM rankingTable)&lt;/code&gt;&lt;/blockquote&gt;
First, the subquery is executed, then the main query is executed considering the results of the subquery.&lt;br /&gt;
&lt;br /&gt;
In general a subquery syntax can be explained like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT column_name [, column_name ]&lt;br /&gt;
FROM&amp;nbsp;&amp;nbsp; table1 [, table2 ]&lt;br /&gt;
WHERE&amp;nbsp; column_name OPERATOR&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SELECT column_name [, column_name ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FROM table1 [, table2 ]&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [WHERE])&lt;/code&gt;&lt;/blockquote&gt;
The above is a SELECT statement, but subqueries can be used with INSERT, UPDATE and DELETE statements.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Subqueries are really powerful and the above examples are just a way of using them. In fact the subquery is in the WHERE clause. However they can be used directly in the SELECT statement or in the FROM clause as well.&lt;br /&gt;
As an example for the SELECT statement:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT (number/(SELECT SUM(number) FROM table)) as myNumber&lt;br /&gt;
FROM table&lt;/code&gt;&lt;/blockquote&gt;
The result of the above is myNumber which represents each number divided by the sum of all numbers.&lt;br /&gt;
&lt;br /&gt;
That&#39;s all for today. I hope you find the above info interesting enough. &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/3505343801019370631/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/sql-subqueries.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/3505343801019370631'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/3505343801019370631'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/sql-subqueries.html' title='SQL: subqueries'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiDW5WWkEHTFYeg5go02b9vhvar0JC4Mzj6GgHFix8P4z6xrkKhihIav0gl8JbOxnKJPieB-uVICS9o4o2qAXUPSA6aHN6X1e1kJsLhZWe15hoqRvOMVD-AyHLRPENwOoilUqylF_4XMew/s72-c/SQL.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4403093474557259872</id><published>2013-01-22T07:00:00.000+01:00</published><updated>2013-01-22T07:00:07.891+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="link"/><category scheme="http://www.blogger.com/atom/ns#" term="onClick"/><category scheme="http://www.blogger.com/atom/ns#" term="void(0)"/><title type='text'>JavaScript: void(0) and links that do nothing</title><content type='html'>What is a web page after all? Isn&#39;t it a bunch of information linked to something else?&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIuwS5Hmm0txtSp4OxAyttj_MKvvts9Q5gDU9KqN0tYYdHeJXyquKYfDftrvlxrcIG50Rjf5zwycUgWV6mJFAj96YKz7F8yw4Hg1dYBsGWAnes9rVBg9YJGh865fZQFE3MtAxeo1cTeWE/s1600/javascript.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIuwS5Hmm0txtSp4OxAyttj_MKvvts9Q5gDU9KqN0tYYdHeJXyquKYfDftrvlxrcIG50Rjf5zwycUgWV6mJFAj96YKz7F8yw4Hg1dYBsGWAnes9rVBg9YJGh865fZQFE3MtAxeo1cTeWE/s1600/javascript.jpg&quot; /&gt;&lt;/a&gt;As you know, web sites without &lt;b&gt;link&lt;/b&gt;s don&#39;t exist. And if they exist they are basically dead. When we insert a link in a page, we generally want people to click on it and go somewhere else. However, some times we need to create links that do nothing. Or to better say, links that do not take the user somewhere else.&lt;br /&gt;
&lt;br /&gt;
With &lt;b&gt;JavaScript &lt;/b&gt;we can create links which can perform different action from actually linking to another page.&lt;br /&gt;
However this is not new to us. We already know the possibility of using links to show or hide DOM elements (&lt;b&gt;jQuery &lt;/b&gt;is a great tool in that matter and it&#39;s JavaScript as well).&lt;br /&gt;
On the other side, here we are talking about something different. We will see how to use &lt;b&gt;void(0)&lt;/b&gt;, but we will see something else and we will make some considerations about it.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;JavaScript in hyperlinks&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
As a start, you might already know we can embed JavaScript directly in links. Something like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;javascript: alert(&#39;The Web Thought&#39;)&quot;&amp;gt;Click!&amp;lt;/a&amp;gt;&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;
is perfectly working&amp;nbsp; and when clicked, the link will open an alert box.&lt;br /&gt;
What we are doing here is quite simple. The alert in JavaScript is a method that returns a null value. That is why we can use it directly in a link.&lt;br /&gt;
In the above example, we are doing something very simple, but what if we need to do something more complicated? That&#39;s when we need to use void(0).&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Void(0)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Void(0) is always returning a null value, avoiding the load of a new page if used in a link:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;javascript: void(0)&quot;&amp;gt;Link that do nothing&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The above snippet will produce a link which does nothing when clicked.&lt;br /&gt;
What&#39;s the whole use of it then?&lt;br /&gt;
A simple example you can find on the Internet is the following:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;javascript: void(myVal=10);alert(&#39;myVal= &#39;+myVal)&quot;&amp;gt;Show the number!&amp;lt;/a&amp;gt;&amp;nbsp;&lt;/code&gt;&lt;/blockquote&gt;
&amp;nbsp;We set myVal to 10 and show it with an alert box. Simple as that. Everything is inside the link itself.&lt;br /&gt;
Ok... but... is all the above good?&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Maybe not...&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
First of all, some of you might have risen an eyebrow: &quot;Why don&#39;t we use onClick?&quot;.&lt;br /&gt;
Good question. And I generally agree with that. I do prefer to use onClick even if in a different way. However, should we use:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;#&quot; onClick=&quot;myJsFunc();&quot;&amp;gt;Link&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
or&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;javascript:void(0)&quot; onClick=&quot;myJsFunc();&quot;&amp;gt;Link&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Some says the first solution, some the second. And the reasons are quite important in both cases.&lt;br /&gt;
Generally developers prefer the void(0) solution, but there&#39;s something else about it which is more important. And this is my opinion.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;My opinion&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Ok, it&#39;s my opinion! It counts for what it counts.&lt;br /&gt;
Hyperlinks should be used to link to something else. It&#39;s a bad practice to use links that do nothing. Or better, links that are not links should not be used.&lt;br /&gt;
If we need to perform an action when a user clicks an element of the page, we can use the onClick event directly in the element. We can, for example, use jQuery (as I said at the beginning of the post) with a styled element (a div for example) that trigger some action when clicked.&lt;br /&gt;
Other solution: we can use a button. A button is born to be pushed. I know you might argue that a link is the same. However links are born to be clicked to go somewhere else. Buttons are born to be clicked in order to perform other action.&lt;br /&gt;
&lt;br /&gt;
I believe it will be an open debate. But I would like to know what you think about it. Please leave a message in the comments section below, if you want to share your thoughts.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4403093474557259872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/javascript-void0-and-links-that-do.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4403093474557259872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4403093474557259872'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/javascript-void0-and-links-that-do.html' title='JavaScript: void(0) and links that do nothing'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIuwS5Hmm0txtSp4OxAyttj_MKvvts9Q5gDU9KqN0tYYdHeJXyquKYfDftrvlxrcIG50Rjf5zwycUgWV6mJFAj96YKz7F8yw4Hg1dYBsGWAnes9rVBg9YJGh865fZQFE3MtAxeo1cTeWE/s72-c/javascript.jpg" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-7060201444119717369</id><published>2013-01-17T07:00:00.000+01:00</published><updated>2013-01-17T12:22:42.734+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ampersand"/><category scheme="http://www.blogger.com/atom/ns#" term="apostrophe"/><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="percentage"/><category scheme="http://www.blogger.com/atom/ns#" term="period"/><category scheme="http://www.blogger.com/atom/ns#" term="semicolon"/><category scheme="http://www.blogger.com/atom/ns#" term="special characters"/><category scheme="http://www.blogger.com/atom/ns#" term="underscore"/><category scheme="http://www.blogger.com/atom/ns#" term="VBScript"/><title type='text'>ASP: special characters</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTD1B3kNEpTBEw-pUgnbJWl_uQGrmcIR0W9qHkdph-tHgzV3VkF8iY8R3TbAfm09QDLQP7hT7d8Fb7vRNnk39SAB8F3jibHbSc31_TIzURFxI5ixYCkyKOxNHjfh36p6Uc7V86emBht4/s1600/keyboard.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; margin-top: 1em;&quot;&gt;&lt;img alt=&quot;ASP&quot; border=&quot;0&quot; height=&quot;65&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTD1B3kNEpTBEw-pUgnbJWl_uQGrmcIR0W9qHkdph-tHgzV3VkF8iY8R3TbAfm09QDLQP7hT7d8Fb7vRNnk39SAB8F3jibHbSc31_TIzURFxI5ixYCkyKOxNHjfh36p6Uc7V86emBht4/s200/keyboard.jpg&quot; title=&quot;ASP&quot; width=&quot;200&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
One of things that newbies find difficult when trying to learn &lt;b&gt;ASP &lt;/b&gt;is the way code is tructured and what all those &lt;b&gt;special characters&lt;/b&gt; are there for.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this short post we are going to see the most common special characters we can find in an ASP page:&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&amp;amp;&lt;/li&gt;
&lt;li&gt;&#39;&lt;/li&gt;
&lt;li&gt;_&lt;/li&gt;
&lt;li&gt;:&lt;/li&gt;
&lt;li&gt;.&lt;/li&gt;
&lt;li&gt;&amp;lt;% ... %&amp;gt;&lt;/li&gt;
&lt;li&gt;&amp;lt;%= ... %&amp;gt;&lt;/li&gt;
&lt;/ul&gt;
As you will see, some of the above might hide even little secrets and surprises.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The ampersand&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The ampersand or &quot;&amp;amp;&quot; is used in ASP to concatenate strings.&lt;br /&gt;
Combining strings is easy:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;
Dim strName &lt;br /&gt;
Dim strName1&lt;br /&gt;
Dim strName2 &lt;br /&gt;
strName1 = &quot;Hello&quot;&lt;br /&gt;
strName2 = &quot;world!&quot;&lt;br /&gt;
strName = strName1 &amp;amp; &quot; &quot; &amp;amp; strName2&lt;br /&gt;
response.write (strName)&lt;br /&gt;
%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Result:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
Hello world!&lt;/code&gt;&lt;/blockquote&gt;
That was easy.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The apostrophe&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The apostrophe &quot; &#39; &quot; is used for commenting code. In any case, the code after the apostrophe is never executed.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The underscore&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The underscore &quot;_&quot; is used to span the code on multiple lines. I must say I never use this special character in my code, but there you are. If you want your code to span on multiple lines, use the underscore:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;
response.write (&quot;This is a long string,&quot; &amp;amp;_&lt;br /&gt;
&quot; and we want to keep it visible so that &quot; &amp;amp;_&lt;br /&gt;
&quot;it won&#39; hide on the right side of the page!&quot;)&lt;br /&gt;
%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The semicolon&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
This one is quite obscure: we use the semicolon &quot;:&quot; when we need to put multiple lines of code on just one line. Isn&#39;t it crazy? Well, if you ever need to do it, now you know how.&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;
Dim strOne&lt;br /&gt;
Dim strTwo&lt;br /&gt;
Dim strThree&lt;br /&gt;
strOne = &quot;1&quot; : strTwo = &quot;2&quot; : strThree = &quot;3&quot;&lt;br /&gt;
%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Wow!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The period&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We all know that with ASP we have objects because basically it is an Object Oriented Programming Language. Well, objects have methods and in order to specify an object method we use a period &quot;.&quot;.&lt;br /&gt;
The object in fact is followed by its method, separated by a dot like in &quot;myObject.Method&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The percentage&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Percentage is used to delimit ASP code. This is easy:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;
... ASP code goes here ...&lt;br /&gt;
%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Equal and percentage&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
This is used as a write shortcut: when we need to print something we can use &amp;lt;%= instead of response.write().&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;%&lt;br /&gt;
Dim strName&lt;br /&gt;
strName = &quot;Hello!&quot;&lt;br /&gt;
%&amp;gt;&lt;br /&gt;
&amp;lt;%=strName%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Result:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
Hello!&lt;/code&gt;&lt;/blockquote&gt;
Ok everyone. That&#39;s all for today.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/7060201444119717369/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/asp-special-characters.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/7060201444119717369'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/7060201444119717369'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/asp-special-characters.html' title='ASP: special characters'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYTD1B3kNEpTBEw-pUgnbJWl_uQGrmcIR0W9qHkdph-tHgzV3VkF8iY8R3TbAfm09QDLQP7hT7d8Fb7vRNnk39SAB8F3jibHbSc31_TIzURFxI5ixYCkyKOxNHjfh36p6Uc7V86emBht4/s72-c/keyboard.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2050794342347156844</id><published>2013-01-15T07:00:00.000+01:00</published><updated>2013-01-15T07:58:51.733+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="convention"/><category scheme="http://www.blogger.com/atom/ns#" term="data type"/><category scheme="http://www.blogger.com/atom/ns#" term="naming"/><category scheme="http://www.blogger.com/atom/ns#" term="variables"/><category scheme="http://www.blogger.com/atom/ns#" term="VBScript"/><title type='text'>ASP: variables naming convention</title><content type='html'>When &lt;b&gt;naming variables &lt;/b&gt;in &lt;b&gt;ASP&lt;/b&gt;, we should consider some &lt;b&gt;conventions&lt;/b&gt;.&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUO3J6UONpfOYrbV8kydXYvTKTmFPJCejzqE_XgUPld4WlARZjPh-QT8JEA5_eRReVQ-6b9jobd_ZgRiwmajQvFizGZa_D82jy0_DSp6p42hwnHcBD4_1k-_3hmjxRShqMnlbGV0B8kM/s1600/asp.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em; margin-top: 1em;&quot;&gt;&lt;img alt=&quot;ASP&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUO3J6UONpfOYrbV8kydXYvTKTmFPJCejzqE_XgUPld4WlARZjPh-QT8JEA5_eRReVQ-6b9jobd_ZgRiwmajQvFizGZa_D82jy0_DSp6p42hwnHcBD4_1k-_3hmjxRShqMnlbGV0B8kM/s1600/asp.jpg&quot; title=&quot;ASP&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Because the way we write code is quite important for us and, possibly, other people, we do need to keep things as much readable as we can. That means, for example, we should use indents when writing procedures and functions or we should follow a common structure in code blocks.&lt;br /&gt;
&lt;br /&gt;
In general we need to make things easy to read and understand.&lt;br /&gt;
That is why there are common naming convention for variables. And in this article we are going to explore them.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Variable data types&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
As you may already know, when we create a variable we usually know what type of data it will be used for. In VBScript we don&#39;t explicitly set a variable data type, however by using prefixes we can help us and others to understand what is the intended use for the variable itself.&lt;br /&gt;
If you read code often you know what I mean. Different is when, for example, you find code snippets on the net (variable names have in fact more imaginative forms due to the need of being more clear). But when we write code for a web application or a web site, we do need to be more, let me say, technical. And so we need to make things more clear.&lt;br /&gt;
There are many data types, but for each one of them, we have a three letters prefix.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Variable names&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
According to the above, variable names should have a non-capitalised prefix, indicating the data type, followed by a word which should be unique and understandable. That could pose a problem: how can a word be clear and immediately understandable, but at the same time not to long?&lt;br /&gt;
When we think about a name for a variable, we might make the mistake to use a too long word. Something easy to imagine is &quot;strName&quot;, but sometimes that&#39;s not enough.&lt;br /&gt;
&lt;br /&gt;
Summarising: we need to choose the right variable data type and then we need to imagine an appropriate short but immediately understandable word which will explain what the variable is.&lt;br /&gt;
&lt;br /&gt;
The two parts, together will form the variable name.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Data type prefixes&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Let&#39;s start from the data type prefixes. The following list contains the data type and the related prefix:&lt;br /&gt;
&lt;br /&gt;
&lt;table border=&quot;1&quot; style=&quot;width: 50%;&quot;&gt;&lt;tbody&gt;
&lt;tr valign=&quot;top&quot;&gt;&lt;th width=&quot;35%&quot;&gt;Data Type &lt;/th&gt; &lt;th width=&quot;65%&quot;&gt;Prefix &lt;/th&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Boolean &lt;/td&gt; &lt;td&gt;bln &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Byte &lt;/td&gt; &lt;td&gt;byt &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Collection object &lt;/td&gt; &lt;td&gt;col &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Currency &lt;/td&gt; &lt;td&gt;cur &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Date-time &lt;/td&gt; &lt;td&gt;dtm &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Double &lt;/td&gt; &lt;td&gt;dbl &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Error &lt;/td&gt; &lt;td&gt;err &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Integer &lt;/td&gt; &lt;td&gt;int &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Long &lt;/td&gt; &lt;td&gt;lng &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Object &lt;/td&gt; &lt;td&gt;obj &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Single &lt;/td&gt; &lt;td&gt;sng &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;String &lt;/td&gt; &lt;td&gt;str &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;User-defined type &lt;/td&gt; &lt;td&gt;udt &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;Variant &lt;/td&gt; &lt;td&gt;vnt &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;ADO command &lt;/td&gt; &lt;td&gt;cmd &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;ADO connection &lt;/td&gt; &lt;td&gt;cnn &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;ADO field &lt;/td&gt; &lt;td&gt;fld &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;ADO parameter &lt;/td&gt; &lt;td&gt;prm &lt;/td&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td&gt;ADO recordset &lt;/td&gt; &lt;td&gt;rst &lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can see, the prefix is not capitalised. The prefix is then followed by the name. In this matter, it is advisable to start with a capital letter following the form &quot;prefixName&quot;.&lt;br /&gt;
&lt;br /&gt;
Ok, I think I said enough for today. &lt;br /&gt;
I hope you find the above info interesting. If so leave a comment below!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/2050794342347156844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/asp-variables-naming-convention.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2050794342347156844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2050794342347156844'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/asp-variables-naming-convention.html' title='ASP: variables naming convention'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBUO3J6UONpfOYrbV8kydXYvTKTmFPJCejzqE_XgUPld4WlARZjPh-QT8JEA5_eRReVQ-6b9jobd_ZgRiwmajQvFizGZa_D82jy0_DSp6p42hwnHcBD4_1k-_3hmjxRShqMnlbGV0B8kM/s72-c/asp.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2174867819387138661</id><published>2013-01-10T07:00:00.000+01:00</published><updated>2013-01-10T07:00:02.157+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="class"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="document.getElementById"/><category scheme="http://www.blogger.com/atom/ns#" term="document.getElementsByClassName"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="id"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="selectors"/><title type='text'>HTML: IDs and classes</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil6GUWiMvDmmHE4hs_XJWBPXMcvz3ZBvqHdSMDQ_DJYKyHNGr5_SB6qVmKiCLda3lfZlTKFNwQlscSBqyp_4RH2-iYF1hNJxzerCSvy7VONl2Tju4ZBGNAn5dDUbqbQTskY8B-rQD_gkU/s1600/css.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img alt=&quot;CSS&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil6GUWiMvDmmHE4hs_XJWBPXMcvz3ZBvqHdSMDQ_DJYKyHNGr5_SB6qVmKiCLda3lfZlTKFNwQlscSBqyp_4RH2-iYF1hNJxzerCSvy7VONl2Tju4ZBGNAn5dDUbqbQTskY8B-rQD_gkU/s200/css.jpg&quot; title=&quot;CSS&quot; width=&quot;158&quot; /&gt;&lt;/a&gt;As I said in the last post, it&#39;s quite interesting to explore the differences between &lt;b&gt;ID&lt;/b&gt;s and &lt;b&gt;class&lt;/b&gt;es in &lt;b&gt;CSS&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
First of all, they are both selectors. But they are very different:&lt;br /&gt;
1) IDs are unique identifiers;&lt;br /&gt;
2) classes are not unique.&lt;br /&gt;
&lt;br /&gt;
The above first difference is quite important because we can give a unique identifier to just one page element, while we can give a class to more than one element.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Imagine we have one span and two divs. We can give the span and one div a class, and an ID to the other span:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;span class=&quot;spanDiv&quot;&amp;gt;One&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;spanDiv&quot;&amp;gt;Two&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div id=&quot;justDiv&quot;&amp;gt;Three&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
So we can make the first two tags red and the third blue using something like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; .spanDiv {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #FF0000;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;nbsp; #justDiv {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #0099FF;&lt;br /&gt;
&amp;nbsp; }&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
And the result will be:&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
.spanDiv {
    color: #FF0000;
}
#justDiv {
    color: #0099FF;
}
&lt;/style&gt;
&lt;span class=&quot;spanDiv&quot;&gt;One&lt;/span&gt;

&lt;br /&gt;
&lt;div class=&quot;spanDiv&quot;&gt;
Two&lt;/div&gt;
&lt;div id=&quot;justDiv&quot;&gt;
Three&lt;/div&gt;
&lt;br /&gt;
That&#39;s basic, isn&#39;t it? I believe we all know about this big difference, but for the beginners out there, I thought it was important to make it clear.&lt;br /&gt;
&lt;br /&gt;
So just remember: you cannot give the same ID to two elements.&lt;br /&gt;
&lt;br /&gt;
Another difference is quite clear from the above code: while classes in CSS are defined with a starting dot (&quot;.spanDiv&quot;), IDs start with a &quot;#&quot; (&quot;#justDiv&quot;). Obviously classes are given as &lt;i&gt;class=&quot;className&quot;&lt;/i&gt; while IDs as &lt;i&gt;id=&quot;idName&quot;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
The above differences are what we all need to know in order to understand when to use IDs and when to use classes.&lt;br /&gt;
Because a class can be used several times, we use them when we need to apply a specific style rule to different elements. On the other hand, IDs are used when a rule should be applied just to one element, being sure that it won&#39;t be applied to anything else.&lt;br /&gt;
In the past, web developers suggested to use IDs and not classes. That&#39;s because, CSS was mainly embedded in each web page. Today, I believe the above rule doesn&#39;t apply anymore. In fact we use linked CSS stylesheets, global rules across the whole site. That is why I suggest to use both IDs and classes, depending on the related situation.&lt;br /&gt;
Another thing to take into account is the fact that IDs and classes are used in JavaScript as well, with &lt;a href=&quot;http://thewebthought.blogspot.com/2012/08/dom-documentgetelementsby.html&quot; target=&quot;_blank&quot;&gt;getElementById and getElementByClassName&lt;/a&gt;. So, when we give an element an ID or a class, we should consider JavaScript as well. &lt;br /&gt;
&lt;br /&gt;
Can we use IDs and classes together?&lt;br /&gt;
Oh yes, we can. And some times it is very convenient.&lt;br /&gt;
Let&#39;s say we have a list of elements (three divs with red font), but just the middle one should be bold:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;style type=&quot;text/css&quot;&amp;gt;&lt;br /&gt;
.red {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; color: #FF0000;&lt;br /&gt;
}&lt;br /&gt;
#bold {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; font-weight: bold;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/style&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;red&quot;&amp;gt;One&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;red&quot; id=&quot;bold&quot;&amp;gt;Two&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;div class=&quot;red&quot;&amp;gt;Three&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The result?&lt;br /&gt;
&lt;style type=&quot;text/css&quot;&gt;
.red {
 color: #FF0000;
}
#bold {
 font-weight: bold;
}
&lt;/style&gt;

&lt;br /&gt;
&lt;div class=&quot;red&quot;&gt;
One&lt;/div&gt;
&lt;div class=&quot;red&quot; id=&quot;bold&quot;&gt;
Two&lt;/div&gt;
&lt;div class=&quot;red&quot;&gt;
Three&lt;/div&gt;
&lt;br /&gt;
As a last thing.. do not use selectors (either IDs or classes) when we don&#39;t need them. Remember that we can select an element by its tag. If we need to style all the links in a page, we don&#39;t really need to give every &amp;lt;a&amp;gt; tag a class or an ID... just select the &amp;lt;a&amp;gt; tag.&lt;br /&gt;
&lt;br /&gt;
That&#39;s all for today.&lt;br /&gt;
See you next time!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/2174867819387138661/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/html-ids-and-classes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2174867819387138661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2174867819387138661'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/html-ids-and-classes.html' title='HTML: IDs and classes'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEil6GUWiMvDmmHE4hs_XJWBPXMcvz3ZBvqHdSMDQ_DJYKyHNGr5_SB6qVmKiCLda3lfZlTKFNwQlscSBqyp_4RH2-iYF1hNJxzerCSvy7VONl2Tju4ZBGNAn5dDUbqbQTskY8B-rQD_gkU/s72-c/css.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1255656406163768818</id><published>2013-01-08T07:00:00.000+01:00</published><updated>2013-01-08T07:00:06.106+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="class"/><category scheme="http://www.blogger.com/atom/ns#" term="common mistakes"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="doctype"/><category scheme="http://www.blogger.com/atom/ns#" term="entity codes"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="id"/><category scheme="http://www.blogger.com/atom/ns#" term="mistakes"/><category scheme="http://www.blogger.com/atom/ns#" term="quotes"/><category scheme="http://www.blogger.com/atom/ns#" term="tag"/><title type='text'>HTML &amp;amp; CSS: common mistakes</title><content type='html'>Today we are going to see something half way between funny and serious: &lt;b&gt;common mistakes&lt;/b&gt; we make while using &lt;b&gt;HTML &lt;/b&gt;and &lt;b&gt;CSS&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Why is it funny? Because sometimes those mistakes are so basic that when talking about them we usually react saying we don&#39;t make such mistakes. But then... when it happens, for any reason - even the most incredible - the only thing we can do is laugh. Mistakes are always just around the corner. The better we know them, the easier we are going to avoid them.&lt;br /&gt;
&lt;br /&gt;
And when it happens... well... just have a laugh!&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;HTML&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The most common mistake when writing HTML code goes under the name of &quot;how could you leave it open?&quot;. When I was young, my teacher used to tell me that quotes and parenthesis must always be closed, otherwise the words inside would catch a cold.&lt;br /&gt;
Well, think it the same way. &lt;i&gt;Always close HTML tags that need to be closed&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
The second mistake is again very common between beginners: &quot;right things in the right place&quot;. We really need to keep things tidy and neat and avoid the great pitfall: &lt;i&gt;use proper nesting tags&lt;/i&gt;. Just to be clear for those of you that started coding yesterday... the following is incorrect:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div&amp;gt;&amp;lt;span&amp;gt;Hello!&amp;lt;/div&amp;gt;&amp;lt;/span&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The third mistake: &quot;right dress for right weather&quot;. I&#39;ve talked about it and I think it&#39;s very important: &lt;i&gt;choose the right &lt;a href=&quot;http://thewebthought.blogspot.com/2011/08/html5-importance-of-doctype.html&quot; target=&quot;_blank&quot;&gt;DOCTYPE&lt;/a&gt; for your work of art&lt;/i&gt;!&lt;br /&gt;
&lt;br /&gt;
Another mistake: &quot;what are those tiny upper scratches in my code?&quot;&lt;br /&gt;
When the great minds decided to make HTML a standard, they decided to use quotes. As I always remember my old primary school teacher, I usually remember to close quotes... do you?&lt;br /&gt;
Thus, if something is not working... &lt;i&gt;check those damn quotes&lt;/i&gt;!&lt;br /&gt;
Oh! By the way... that&#39;s a common mistake in other languages like JavaScript and ASP as well.&lt;br /&gt;
&lt;br /&gt;
We are getting close to CSS... and so, the last HTML mistake is something that stays in between. Can you guess?&lt;br /&gt;
&quot;Is it meat or fish?&quot;&lt;br /&gt;
Well IDs are not classes and classes are not IDs.&lt;br /&gt;
I believe you all already know the difference, but there it is. &lt;i&gt;Do not confuse IDs and classes, because they are different&lt;/i&gt;.&lt;br /&gt;
Should I explain why? In CSS, jQuery and JavaScript we can manipulate DOM elements by IDs or classes. Well... I think I will write something about it in the future...&lt;br /&gt;
&lt;br /&gt;
Now, just to finish up things a few reminders:&lt;br /&gt;
1) &lt;i&gt;do not use uppercase tags&lt;/i&gt; (&amp;lt;DIV&amp;gt;);&lt;br /&gt;
2) &lt;i&gt;do not use inline styles&lt;/i&gt;;&lt;br /&gt;
3) &lt;i&gt;use &lt;a href=&quot;http://thewebthought.blogspot.com/2011/05/html-special-entity-codes.html&quot; target=&quot;_blank&quot;&gt;entity codes&lt;/a&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Ok folks, let&#39;s move on to CSS!&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;CSS&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
CSS common mistakes are quite... hmmm... common and - well -&amp;nbsp; similar to HTML&#39;s.&lt;br /&gt;
&lt;br /&gt;
The old primary school teacher strikes again: &quot;what&#39;s opened should always be closed!&quot;&lt;br /&gt;
We are talking about curly brackets. Well, well, well, we all hate the person who thought curly brackets are cool for CSS, but that&#39;s it! We have to accept it.&lt;br /&gt;
So &lt;i&gt;remember to close CSS&amp;nbsp; brackets&lt;/i&gt;!&lt;br /&gt;
And, while we are on it... &lt;i&gt;every declaration should end with a semicolon&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://thewebthought.blogspot.com/2011/03/web-sites-how-to-keep-things-tidy-with.html&quot; target=&quot;_blank&quot;&gt;As I always say&lt;/a&gt;, to keep things tidy we need to be sure that classes and IDs are working properly. As said: &quot;style matters!&quot; and &quot;fish is not meat!&quot;. &lt;i&gt;Do not confuse classes with IDs&lt;/i&gt;!&lt;br /&gt;
&lt;br /&gt;
The third mistake is not really a mistake. In fact it is more an advice: &quot;short legged people should not jump the ditch!&quot;. I do not like shortcuts: shorthands in CSS are really awful, while shortened colour declarations are incredibly horrible. &lt;i&gt;Do not use shortcuts&lt;/i&gt;! ... please ...&lt;br /&gt;
&lt;br /&gt;
And that&#39;s it!&lt;br /&gt;
&lt;br /&gt;
As always, if you want to share your thoughts about HTML and CSS common mistakes, please do so using the comments section below!&lt;br /&gt;
In the meantime... have a glorious day! &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1255656406163768818/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/html-css-common-mistakes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1255656406163768818'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1255656406163768818'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/html-css-common-mistakes.html' title='HTML &amp;amp; CSS: common mistakes'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-1283491697670963518</id><published>2013-01-03T07:00:00.000+01:00</published><updated>2013-01-03T07:00:11.288+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="the web thought"/><title type='text'>the web thought: most viewed posts in 2012</title><content type='html'>As I did at the &lt;a href=&quot;http://thewebthought.blogspot.com/2012/01/top-ten-most-followed-posts.html&quot; target=&quot;_blank&quot;&gt;beginning of last year&lt;/a&gt;, I would like to list the top 10 most viewed posts for 2012...&lt;br /&gt;
&lt;br /&gt;
So, here we go - and you might even discover something you have missed last year.&lt;br /&gt;
&lt;br /&gt;
&lt;ol&gt;
&lt;li value=&quot;10&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2012/05/css-making-background-image-fit-any.html&quot; target=&quot;_blank&quot;&gt;CSS: Making background image fit any screen resolution (revised)&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;9&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2011/06/css-html-nested-lists-with-style.html&quot; target=&quot;_blank&quot;&gt;CSS &amp;amp; HTML: nested lists with style&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;8&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2011/01/jquery-javascript-analogue-clocks.html&quot; target=&quot;_blank&quot;&gt;jQuery &amp;amp; JavaScript: Analogue clocks&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;7&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2012/02/css-image-zoom-effect.html&quot; target=&quot;_blank&quot;&gt;CSS: image zoom effect&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;6&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2011/06/css-float-center-yes-we-can-do-it.html&quot; target=&quot;_blank&quot;&gt;CSS: float center? Yes, we can do it!&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;5&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2012/01/css-fixed-header-and-footer.html&quot; target=&quot;_blank&quot;&gt;CSS: fixed header and footer&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;4&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2010/10/asp-create-pdf-files-with-fpdf.html&quot; target=&quot;_blank&quot;&gt;ASP: Create pdf files with FPDF&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;3&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2012/01/jquery-loading-content-while-user.html&quot; target=&quot;_blank&quot;&gt;jQuery: loading content while user scrolls (infinite scroll)&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;2&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2012/05/web-design-collection-of-progress-bars.html&quot; target=&quot;_blank&quot;&gt;Web Design: a collection of progress bars&lt;/a&gt;&lt;/li&gt;
&lt;li value=&quot;1&quot;&gt;&lt;a href=&quot;http://thewebthought.blogspot.com//2010/10/css-making-background-image-fit-any.html&quot; target=&quot;_blank&quot;&gt;CSS: Making background image fit any screen resolution&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/1283491697670963518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/the-web-thought-most-viewed-posts-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1283491697670963518'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/1283491697670963518'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/the-web-thought-most-viewed-posts-in.html' title='the web thought: most viewed posts in 2012'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-493605939768400033</id><published>2013-01-01T00:00:00.000+01:00</published><updated>2013-01-01T00:00:10.572+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="offtopic"/><category scheme="http://www.blogger.com/atom/ns#" term="the web thought"/><title type='text'>Happy New Year</title><content type='html'>&lt;div style=&quot;text-align: center;&quot;&gt;
Just a thought to all the readers
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 50PX;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;HAPPY 2013!&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/493605939768400033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2013/01/happy-new-year.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/493605939768400033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/493605939768400033'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2013/01/happy-new-year.html' title='Happy New Year'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4317172424595799112</id><published>2012-12-27T07:00:00.000+01:00</published><updated>2012-12-27T07:00:03.517+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="check"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jsdoc"/><category scheme="http://www.blogger.com/atom/ns#" term="jshint"/><category scheme="http://www.blogger.com/atom/ns#" term="jslint"/><category scheme="http://www.blogger.com/atom/ns#" term="syntax error"/><title type='text'>JavaScript: syntax checker</title><content type='html'>In this short post I&#39;m going to share some really useful &lt;b&gt;JavaScript syntax checker&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
When programming we surely need to check what it&#39;s been done. It&#39;s better to verify the code when still in production, during the so-called test period. When published, a web site could still contain errors, but what we surely need to avoid is those annoying syntax errors.&lt;br /&gt;
&lt;br /&gt;
There are specific programs freely available that we can use to do so. Here we are going to see 3 tools that we should carefully consider.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;JSLint&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&quot;&lt;b&gt;JSLint
  &lt;/b&gt;is a JavaScript program that looks for problems in JavaScript programs.
  It is a code quality tool. [...] JSLint takes a JavaScript source and scans it. If it finds
  a problem, it returns a message describing the problem and an approximate
  location within the source. The problem is not necessarily a syntax error,
  although it often is. JSLint looks at some style conventions
  as well as structural problems. It does not prove that your program is
  correct. It just provides another set of eyes to help spot problems. [...] JSLint can operate on JavaScript source, HTML source, CSS source, or JSON
  text.&quot;&lt;br /&gt;
&lt;br /&gt;
As you can see it&#39;s quite a complete tool. It&#39;s obvious that there&#39;s no program that will say if a snippet is correct or not. What those tools can do is help us in spotting a possible issue. And maybe keep our code clean.&lt;br /&gt;
&lt;br /&gt;
Just visit&amp;nbsp; &lt;a href=&quot;http://www.jslint.com/lint.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;JSLint&lt;/a&gt; web page and read for yourself what it can do for us.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;JSHint&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://jshint.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;JSHint&lt;/a&gt; is in some way a more simple tool. First of all is an on-line tool and it &quot;.. is a tool to detect
   errors and potential problems in JavaScript code and can be used to enforce coding conventions.&quot;&lt;br /&gt;
&lt;br /&gt;
We just need to put the code, select what kind of checks we need and wait for results.&lt;br /&gt;
&lt;br /&gt;
Again, visit the above web site for more information.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Jsdoc&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The last tool is a bit different...&lt;br /&gt;
&quot;&lt;a href=&quot;http://code.google.com/p/jsdoc-toolkit/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;JsDoc &lt;/a&gt;Toolkit is an application, written in JavaScript, for 
automatically generating template-formatted, multi-page HTML (or XML, 
JSON, or any other text-based) documentation from commented JavaScript 
source code.&quot;&lt;br /&gt;
&lt;br /&gt;
The web site explains everything about it and it&#39;s worth visiting it, as we all know how important code documentation is (especially in large project).&lt;br /&gt;
&lt;br /&gt;
Ok, folks... that&#39;s all for today.&lt;br /&gt;
If you use different JavaScript tools and you want to share them with us, please add them using the comments section below.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4317172424595799112/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/javascript-syntax-checker.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4317172424595799112'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4317172424595799112'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/javascript-syntax-checker.html' title='JavaScript: syntax checker'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8807663590528811441</id><published>2012-12-25T00:00:00.000+01:00</published><updated>2012-12-25T00:00:07.723+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="offtopic"/><category scheme="http://www.blogger.com/atom/ns#" term="the web thought"/><title type='text'>Merry Christmas</title><content type='html'>&lt;h2 style=&quot;text-align: center;&quot;&gt;
MERRY CHRISTMAS&lt;/h2&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
FROM&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img alt=&quot;the web thought&quot; border=&quot;0&quot; height=&quot;105&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLnaMnEc2fgifHlOv3vEyahvnAp4gdUXwBUAu3QO8BRpNM4A0fILyDGbMXpCMVuQriuk9jJQhkUFyqwT4bRvJ7BopSWowDVfshrli9fy8GyubnYuMbQLzr4biBowgQuzesdEFNk5fazGg/s640/twt.gif&quot; title=&quot;the web thought&quot; width=&quot;80%&quot; /&gt;&lt;/div&gt;
&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8807663590528811441/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/merry-christmas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8807663590528811441'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8807663590528811441'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/merry-christmas.html' title='Merry Christmas'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLnaMnEc2fgifHlOv3vEyahvnAp4gdUXwBUAu3QO8BRpNM4A0fILyDGbMXpCMVuQriuk9jJQhkUFyqwT4bRvJ7BopSWowDVfshrli9fy8GyubnYuMbQLzr4biBowgQuzesdEFNk5fazGg/s72-c/twt.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5634511449651783236</id><published>2012-12-20T07:00:00.000+01:00</published><updated>2012-12-20T07:00:02.905+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="overflow"/><category scheme="http://www.blogger.com/atom/ns#" term="overflow-x"/><category scheme="http://www.blogger.com/atom/ns#" term="overflow-y"/><title type='text'>CSS: overflow</title><content type='html'>Working with containers in a web page could be tricky, especially if we need to manage large text. There&#39;s a CSS declaration which we need to fully understand in that matter: overflow.&lt;br /&gt;
&lt;br /&gt;
When we create a container - let&#39;s call it &quot;box&quot; - the overflow declaration helps the browser to understand what to do with the eventual content that doesn&#39;t fit in the container. If the container has a fixed height, what will happens to the content that doesn&#39;t fit in the box?&lt;br /&gt;
When the box has not a fixed height, the content will fit in any case and the box will enlarge, giving the needed space to the content. When the height is fixed, we might need to use the overflow declaration.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The overflow declaration&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
There are four possible values for overflow:&lt;br /&gt;
1) visible&lt;br /&gt;
2) hidden&lt;br /&gt;
3) auto&lt;br /&gt;
4) scroll&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;
When we assign &quot;&lt;b&gt;visible&lt;/b&gt;&quot; to overflow, the content will be always visible, regardless the size of the box.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 1px solid #cc0000; height: 150px; overflow: visible; white-space: nowrap; width: 150px;&quot;&gt;
This is a large text and the first line is long&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If set to &quot;&lt;b&gt;hidden&lt;/b&gt;&quot;, the content not fitting in the box, will not show and the box will appear as a hole in our page, showing just a part of what&#39;s behind. The overflowing content will not be accessible to the user.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 1px solid #cc0000; height: 150px; overflow: hidden; white-space: nowrap; width: 150px;&quot;&gt;
This is a large text and the first line is long&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;/div&gt;
&lt;br /&gt;
With &quot;&lt;b&gt;auto&lt;/b&gt;&quot;, scrollbars are shown where necessary. It could be that the horizontal scrollbar is shown, or the vertical one... or both (if needed)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 1px solid #cc0000; height: 150px; overflow: auto; white-space: nowrap; width: 150px;&quot;&gt;
This is a large text and the first line is long&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;/div&gt;
&lt;br /&gt;
&quot;&lt;b&gt;scroll&lt;/b&gt;&quot; always shows horizontal and vertical scrollbars, regardless what&#39;s inside the box. It means that even if the content perfectly fits the container, we will always have scrollbars.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 1px solid #cc0000; height: 150px; overflow: scroll; white-space: nowrap; width: 150px;&quot;&gt;
This is a large text and the first line is long&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;/div&gt;
&lt;br /&gt;
Usually we set the overflow to &quot;auto&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Overflow-x and overflow-y&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We can even play with overflow-x and overflow-y. With the first, we can set the overflowing content behaviour in horizontal, with overflow-y in vertical.&lt;br /&gt;
When we need to force the vertical scrollbar only, we will set the overflow-y to &quot;auto&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;border: 1px solid #cc0000; height: 150px; overflow-x: scroll; overflow-y: hidden; white-space: nowrap; width: 150px;&quot;&gt;
This is a large text and the first line is long&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;br /&gt;
This is a large text&lt;/div&gt;
&lt;br /&gt;
In the above example we have overflow-x: scroll and overflow-y: hidden.&lt;br /&gt;
As you can see the above two declarations are really helpful, giving us a full control of the situation.&lt;br /&gt;
&lt;br /&gt;
That&#39;s it for today... &lt;br /&gt;
Have a nice day and happy coding.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5634511449651783236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/css-overflow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5634511449651783236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5634511449651783236'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/css-overflow.html' title='CSS: overflow'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4806090480170799412</id><published>2012-12-18T07:00:00.000+01:00</published><updated>2012-12-18T07:00:00.483+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="gallery slideshow"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="plug-in"/><category scheme="http://www.blogger.com/atom/ns#" term="responsive"/><category scheme="http://www.blogger.com/atom/ns#" term="slider"/><category scheme="http://www.blogger.com/atom/ns#" term="thumbnail"/><title type='text'>jQuery: image gallery plug-ins</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s1600/jq.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s1600/jq.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&amp;nbsp;&lt;b&gt;jQuery image gallery plugins&lt;/b&gt;! You all know there are so many of those plug-ins, however, here&#39;s a list of the best... in my opinion...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://bxgalleryplugin.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;bxGallery&lt;/a&gt;&lt;br /&gt;
&quot;bxGallery is jQuery image gallery plugin that contains automatic thumbnail generation.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.twospy.com/galleriffic/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Galleriffic&lt;/a&gt;&lt;br /&gt;
&quot;Galleriffic is a jQuery plugin that provides a rich, post-back free 
experience optimized to handle high volumes of photos while conserving 
bandwidth. I am not so great at spelling, and it was much later that I realized 
that the more appropriate spellings would be Galle&lt;i&gt;rif&lt;/i&gt;ic or 
Galle&lt;i&gt;rrif&lt;/i&gt;ic, but is too late now for a name change, so Galleriffic 
remains.&quot; &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.pikachoose.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Pikachoose&lt;/a&gt;&lt;br /&gt;
&quot;Pikachoose is a lightweight jQuery slideshow plugin, with tons of great features! jCarousel integrates smoothly with PikaChoose to give your gallery simple and effective carousel. PikaChoose now has API hooks for integrating lightboxes and other things.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.yoxigen.com/yoxview/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;YoxView&lt;/a&gt;&lt;br /&gt;
&quot;YoxView is a free Lightbox-type media and image viewer jQuery        plugin. It&#39;s easy to use and feature-rich.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://spaceforaname.com/galleryview/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;GalleryView&lt;/a&gt;&lt;br /&gt;
&quot;My goal with GalleryView is to provide an extensive set of options to the user. Not only will the user be able to adjust photo and thumbnail sizes, and transition speeds, but he will also have the ability to choose from a selection of element positions, transition styles and other features.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://flexslider.woothemes.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;FlexSlider 2&lt;/a&gt;&lt;br /&gt;
&quot;The best responsive slider. Period.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://brice.lechatellier.com/code-design/wmuslider/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;wmuSlider &lt;/a&gt;&lt;br /&gt;
&quot;wmuSlider, a jQuery responsive slider&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://responsive-slides.viljamis.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;ResponsiveSlides&lt;/a&gt;&lt;br /&gt;
&quot;ResponsiveSlides.js is a tiny jQuery plugin that creates a responsive slider using list items inside &amp;lt;ul&amp;gt;. It works with wide range of browsers including all IE versions from IE6 and up. It also adds css max-width support for IE6 and other browsers that don&#39;t natively support it. Only dependency is jQuery (1.4 and up supported) and that all the images are same size.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://coffeescripter.com/2009/07/ad-gallery-a-jquery-gallery-plugin/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;AD Gallery&lt;/a&gt;&lt;br /&gt;
&quot;...It’s a gallery plugin that’s a bit different than plugins like Thickbox and Lightbox.&quot; &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4806090480170799412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/jquery-image-gallery-plug-ins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4806090480170799412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4806090480170799412'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/jquery-image-gallery-plug-ins.html' title='jQuery: image gallery plug-ins'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhXjiie538v_sQT-00uzCx60u7-aMsvsusrDs99WBiSWvg5QPeIU0tXQa5KQNCOlOcoopi0FH4oHGb6FHQl3r1NQ4BsiDqHbXsvyz0FDGajYpXlUvT0LcGpqzzSKx5ml4pECXsBWEokadI/s72-c/jq.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6772597914783509805</id><published>2012-12-13T07:00:00.000+01:00</published><updated>2012-12-13T07:00:06.797+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="AddHeader"/><category scheme="http://www.blogger.com/atom/ns#" term="asp"/><category scheme="http://www.blogger.com/atom/ns#" term="http 301"/><category scheme="http://www.blogger.com/atom/ns#" term="http 302"/><category scheme="http://www.blogger.com/atom/ns#" term="permanet redirect"/><category scheme="http://www.blogger.com/atom/ns#" term="response.addheader"/><category scheme="http://www.blogger.com/atom/ns#" term="response.redirect"/><category scheme="http://www.blogger.com/atom/ns#" term="status code"/><category scheme="http://www.blogger.com/atom/ns#" term="VBScript"/><title type='text'>ASP: permanent redirect with HTTP 301 status code</title><content type='html'>There are situations when we need to &lt;b&gt;redirect &lt;/b&gt;the visitor to a web site to another place.&lt;br /&gt;
This is done for example when the web site is no longer updated or valid.&lt;br /&gt;
In order to do so we can redirect the visitor permanently with &lt;b&gt;HTTP 301&lt;/b&gt; response code. That is done because we need to tell the user-agent that the location is permanently moved elsewhere.&lt;br /&gt;
I believe you all know what HTTP headers are... or maybe we should start from there...&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;HTTP headers&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
HTTP headers are components of the message of request and response in an HTTP transaction. Therefore they define the parameters of the transaction.&lt;br /&gt;
They normally have the form of pairs and examples are &lt;i&gt;Cache-Control: no-cache&lt;/i&gt; or &lt;i&gt;Content-Type:·text/html;·charset=UTF-8&lt;/i&gt;. If you need to see headers from a web page, you can always visit 
&lt;a href=&quot;http://www.rexswain.com/httpview.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Rex Swain&#39;s HTTP Viewer&lt;/a&gt; submit an URl and get the headers.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Response redirect?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
In ASP we can redirect to another page using Response.Redirect. However the Response.Redirect will generate a status code of 302 which means &quot;The requested resource resides temporarily under a different URI.&quot; (quote from &lt;a href=&quot;http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;W3C&lt;/a&gt;). And that&#39;s not ok with us... we need to have a 301 response code.&lt;br /&gt;
In the end Response.Redirect is not a feasible solution. &lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The solution&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We need to use something else. And the best way is to use a Response.AddHeader. Basically we need to issue the status code and then redirect the user:&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;code&gt;&amp;lt;%&lt;br /&gt;
Response.Status = &quot;301 Moved Permanently&quot;&lt;br /&gt;
Response.AddHeader &quot;Location&quot;, &quot;http://www.anothe-site.com/&quot;&lt;br /&gt;
Response.End&lt;br /&gt;
%&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
We set the status, we add the header and that&#39;s it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope the above will help someone. As usual please use the comments section below for sharing your ideas and experiences.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/6772597914783509805/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/asp-permanent-redirect-with-http-301.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6772597914783509805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6772597914783509805'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/asp-permanent-redirect-with-http-301.html' title='ASP: permanent redirect with HTTP 301 status code'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8405506660743308901</id><published>2012-12-11T07:00:00.000+01:00</published><updated>2012-12-12T17:42:46.820+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="begin"/><category scheme="http://www.blogger.com/atom/ns#" term="end"/><category scheme="http://www.blogger.com/atom/ns#" term="exists"/><category scheme="http://www.blogger.com/atom/ns#" term="functions"/><category scheme="http://www.blogger.com/atom/ns#" term="if"/><category scheme="http://www.blogger.com/atom/ns#" term="IN"/><category scheme="http://www.blogger.com/atom/ns#" term="in operator"/><category scheme="http://www.blogger.com/atom/ns#" term="left"/><category scheme="http://www.blogger.com/atom/ns#" term="right"/><category scheme="http://www.blogger.com/atom/ns#" term="sql query"/><category scheme="http://www.blogger.com/atom/ns#" term="sql server"/><category scheme="http://www.blogger.com/atom/ns#" term="T-SQL"/><title type='text'>SQL: the power of left, right and IN</title><content type='html'>As the title mentions, in this short article I will show you how to benefit from the use of the &lt;b&gt;left &lt;/b&gt;and &lt;b&gt;right&lt;/b&gt; &lt;b&gt;SQL&lt;/b&gt; &lt;b&gt;functions &lt;/b&gt;together with the &lt;b&gt;IN operator&lt;/b&gt;.&lt;br /&gt;
Before doing so, we need to understand what are the two functions and what the operator is doing.&lt;br /&gt;
Please follow me and see what we can do!&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;&lt;br /&gt;The left and right functions&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The two functions work perfectly when we need to isolate part of a string. They return the left or right part of a character string with the specified number of characters.&lt;br /&gt;
As an example, the syntax for the left function is:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
LEFT(strVar, numChr)&lt;/code&gt;&lt;/blockquote&gt;
Where strVar is a character string and numChr is a positive number that specifies how many characters we want to get from the string (strVar).&lt;br /&gt;
Consider that the same is working for the right function. &lt;br /&gt;
The difference between the two functions is that left starts considering the string from the left hand side, while right considers the characters from the right hand side of the string.&lt;br /&gt;
As a general example we can create a query like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT LEFT(name, 2)&lt;br /&gt;FROM namesTable&lt;/code&gt;&lt;/blockquote&gt;
If our names (name) in the table (namesTable) are “John”, “Jack” and “Daniel” the results from the above query will be: “Jo”, “Ja” and “Da”. We are getting just the leftmost two characters from the name column.&lt;br /&gt;
To simplify the above example we can create two simple queries for the left and right functions:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT LEFT(‘abcdefg’, 2)&lt;br /&gt;SELECT RIGHT(‘abcdefg’, 2)&lt;/code&gt;&lt;/blockquote&gt;
The first query will return ‘ab’ while the second will return ‘fg’.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The IN operator&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The IN operator can be used to determine if a specified value matches any value in a subquery or a list.&lt;br /&gt;
Now... now... that might sound complicated, but it’s not.&lt;br /&gt;
A common use of the IN operator is in the WHERE clause. We can in fact convert a query like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT *&lt;br /&gt;FROM namesTable&lt;br /&gt;WHERE name = ‘John’ or name = ‘Jack’ or name = ‘Daniel’&lt;/code&gt;&lt;/blockquote&gt;
To a query like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT *&lt;br /&gt;FROM namesTable&lt;br /&gt;WHERE name IN (‘John’, ‘Jack’, ‘Daniel’)&lt;/code&gt;&lt;/blockquote&gt;
Isn’t it cool?&lt;br /&gt;
There something more interesting. We can even use another operator... well, actually the opposite operator: NOT IN. As you imagine NOT IN will return the names different from ‘John’, ‘Jack’ and ‘Daniel’:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT *&lt;br /&gt;FROM namesTable&lt;br /&gt;WHERE name NOT IN (‘John’, ‘Jack’, ‘Daniel’)&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;All together now!&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Now, we can combine the two functions and the IN operator. How?&lt;br /&gt;
Let’s say we want to retrieve all records only in specific cases. In T-Sql we can use a conditional statement and execute a query based on that.&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
IF (SELECT COUNT(*) FROM namesTable) &amp;gt; 1 &lt;br /&gt;BEGIN &lt;br /&gt;... ... ...&lt;br /&gt;END&lt;/code&gt;&lt;/blockquote&gt;
The above executes the code inside the BEGIN END only if the table namesTable contains more than 1 record. &lt;br /&gt;
At the same time we can use something like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
SELECT *&lt;br /&gt;FROM namesTable&lt;br /&gt;WHERE LEFT(name, 1) IN (‘J’, ‘D’)&lt;/code&gt;&lt;/blockquote&gt;
Which returns all records that have a name starting with J or D.&lt;br /&gt;
Now we can put all together:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
IF EXISTS (SELECT * FROM namesTable WHERE LEFT(name, 1) IN (‘J’, ‘D’))&lt;br /&gt;BEGIN&lt;br /&gt;SELECT * FROM otherTable&lt;br /&gt;END&lt;/code&gt;&lt;/blockquote&gt;
The above example is just to explain the logic: if at least a name in the namesTable starts with ‘J’ or ‘D’ the second statement is executed, retrieving all the data from anothe table (otherTable).&lt;br /&gt;
&lt;br /&gt;
This is just the beginning, as you may imagine. I leave to your fantasy how to use the above, however, if you want to share your experience just use the comment section below.&lt;br /&gt;
In the meantime... happy coding!&lt;br /&gt;
&lt;br /&gt;
(Thanks to Paolo for the hint!) &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8405506660743308901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/sql-power-of-left-right-and-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8405506660743308901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8405506660743308901'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/sql-power-of-left-right-and-in.html' title='SQL: the power of left, right and IN'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5013845815271199395</id><published>2012-12-06T07:00:00.000+01:00</published><updated>2012-12-06T07:00:07.262+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Christmas"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>jQuery: snow effects for Christmas!</title><content type='html'>As I did &lt;a href=&quot;http://thewebthought.blogspot.com/2011/11/jquery-javascript-christmas-effects.html&quot; target=&quot;_blank&quot;&gt;last year&lt;/a&gt;, here is a quick collection of &lt;b&gt;Christmas&lt;/b&gt; effects. In particular we are talking about snow effects made exclusively with &lt;b&gt;jQuery&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
Ready for the holiday season? Here we go:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://workshop.rs/2012/01/jquery-snow-falling-plugin/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery snow falling plugin&lt;/a&gt;&lt;br /&gt;
&quot;Idea is to create one snowflake initially, clone that snowflake at some time interval and add random values for properties for each of them. And it’s done in less than 1kb minifed.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://forrst.com/posts/jQuery_font_flake_snow_flake_experiment-wtG&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery font flake / snow flake experiment&lt;/a&gt;&lt;br /&gt;
&quot;was bored one night, had an hour charge left in the laptop, challenged myself with this.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.somethinghitme.com/2011/10/05/jquery-snowfall-1-5-update-now-with-snow-buildup/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery Snowfall 1.5 update now with snow buildup!&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://jqsnow.sourceforge.net/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jQuery Snow&lt;/a&gt;&lt;br /&gt;
&quot;This extension decorates your webpage with falling snow.&quot;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://blog.web3canvas.com/2011/12/beautiful-christmas-santa-snow-falling.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Beautiful Christmas Santa Snow Falling Greetings with html5 css3 and jquery&lt;/a&gt;&lt;br /&gt;
&quot;Hey, Still using old Flash Christmas Greetings ? For this Christmas, We are Introducing a Snow Fall Animation with HTML5 CSS3 and Jquery.&quot;&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5013845815271199395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/jquery-snow-effects-for-christmas.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5013845815271199395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5013845815271199395'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/jquery-snow-effects-for-christmas.html' title='jQuery: snow effects for Christmas!'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-9220783091616411062</id><published>2012-12-04T07:00:00.000+01:00</published><updated>2012-12-04T07:00:11.017+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".attr()"/><category scheme="http://www.blogger.com/atom/ns#" term=".html()"/><category scheme="http://www.blogger.com/atom/ns#" term=".text()"/><category scheme="http://www.blogger.com/atom/ns#" term=".val()"/><category scheme="http://www.blogger.com/atom/ns#" term="DOM"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="manipulate"/><title type='text'>jQuery: get and set information for DOM elements</title><content type='html'>&lt;b&gt;jQuery&lt;/b&gt; is a great tool when we need to manipulate elements in our web page.&lt;br /&gt;
Today I would like to focus your attention on some useful &lt;b&gt;methods&lt;/b&gt; that allow us to get or set information of &lt;b&gt;DOM&lt;/b&gt; elements.&lt;br /&gt;
We are talking about:&lt;br /&gt;
1) &lt;b&gt;.text()&lt;/b&gt;&lt;br /&gt;
2) &lt;b&gt;.html()&lt;/b&gt;&lt;br /&gt;
3) &lt;b&gt;.val()&lt;/b&gt;&lt;br /&gt;
4) &lt;b&gt;.attr() &lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
Let&#39;s see them one by one.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;.text()&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The method allow us to get or set the text of an element.&lt;br /&gt;
Considering a div like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div id=&quot;test&quot;&amp;gt;This is an example&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
we can get the text contained using:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).text()&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
The same method allows us to set a text inside a container. If the container is not empty, the text inside will be replaced. We can use the method in the following way:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).text(&quot;Replaced text inside the container&quot;)&lt;/code&gt;&lt;/blockquote&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;.html()&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The .html() method works in a similar way. it gets or sets the html content of an element (including the code).&lt;br /&gt;
If our container is:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div id=&quot;test&quot;&amp;gt;&amp;lt;b&amp;gt;This is a bold text&amp;lt;/b&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
the method:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).html()&lt;/code&gt;&lt;/blockquote&gt;
will get:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;b&amp;gt;This is a bold text&amp;lt;/b&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
As you may see the &amp;lt;b&amp;gt; tags are included in what we get.&lt;br /&gt;
If we want to set html code to an element, using something like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).html(&quot;&amp;lt;i&amp;gt;This is italics&amp;lt;/i&amp;gt;&quot;)&lt;/code&gt;&lt;/blockquote&gt;
The result will reflect the tags, changing the content of our div from&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&lt;b&gt;This is a bold text&lt;/b&gt;&lt;/code&gt;&lt;/blockquote&gt;
to&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&lt;i&gt;This is italics&lt;/i&gt;&lt;/code&gt;&lt;/blockquote&gt;
Interesting?&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;.val()&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
This method allow us to get or set the value of a form field. it works as the other two methods above.&lt;br /&gt;
Let&#39;s imagine a form containing an input element like&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;input type=&quot;text&quot; id=&quot;test&quot; value=&quot;Hello!&quot;&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The method used as:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).val()&lt;/code&gt;&lt;/blockquote&gt;
will get the value of the input box (&quot;Hello!&quot;).&lt;br /&gt;
If we want to set the value, we can use the method the following way:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).val(&quot;Goodbye!&quot;)&lt;/code&gt;&lt;/blockquote&gt;
This method is indeed very powerful as you may imagine.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;.attr()&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The last method is used to get or set attribute values.&lt;br /&gt;
If we have a link like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;a href=&quot;http://thewebthought.blogspot.com&quot; id=&quot;test&quot;&amp;gt;the web thought&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
The following code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).attr(&quot;href&quot;)&lt;/code&gt;&lt;/blockquote&gt;
will get:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
http://thewebthought.blogspot.com&lt;/code&gt;&lt;/blockquote&gt;
while&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
$(&quot;#test&quot;).attr(&quot;href&quot;, &quot;http://thewebthought.blogspot.com/p/search.html&quot;)&lt;/code&gt;&lt;/blockquote&gt;
will set or change the attribute to the above URL.&lt;br /&gt;
&lt;br /&gt;
Wow! Just one long sentence to describe all - I&#39;m really impressed!&lt;br /&gt;
&lt;br /&gt;
Ok, leaving self-indulgence apart... what do you think about the above methods? Aren&#39;t they interesting?&lt;br /&gt;
please leave your ideas in the comments section below!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/9220783091616411062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/12/jquery-get-and-set-information-for-dom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/9220783091616411062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/9220783091616411062'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/12/jquery-get-and-set-information-for-dom.html' title='jQuery: get and set information for DOM elements'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5988473534185915405</id><published>2012-11-29T07:00:00.000+01:00</published><updated>2012-11-29T07:00:11.123+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><category scheme="http://www.blogger.com/atom/ns#" term="XML"/><title type='text'>JavaScript &amp; XML: validate an XML document</title><content type='html'>I think we all know how to use &lt;b&gt;XML&lt;/b&gt; documents. For example RSS feeds are basically XML files, as well as sitemaps. Those files may be very important when managing a web site, but those examples are just a small part of the common use of XML documents. Just to make things clear, another example: when you export a Blogger blog, the file you get is an XML file.&lt;br /&gt;
When I&#39;ve written the article on &lt;a href=&quot;http://thewebthought.blogspot.com/2011/05/rss-feed-how-to-create-custom-feeds.html&quot; target=&quot;_blank&quot;&gt;how to create an RSS feed&lt;/a&gt;, I discovered a very useful &lt;b&gt;JavaScript&lt;/b&gt; snippet that helps us to &lt;b&gt;validate&lt;/b&gt; an XML file.&lt;br /&gt;
Unfortunately I don&#39;t remember where I got it, but, even if I surely rearranged it, if you know the original source, please let me know so that I can give due credit to the author.&lt;br /&gt;
Ok, said that, let&#39;s see how to do it.&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
First of all, let&#39;s create a form like the following:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;form name=&quot;form1&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;input type=&quot;file&quot; name=&quot;file&quot; size=&quot;50&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; &amp;lt;input type=&quot;button&quot; value=&quot;Validate&quot; onclick=&quot;Validate()&quot;&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
In the input element, we need to insert a valid path to an XML file (it can be local or remote, it doesn&#39;t matter).&lt;br /&gt;
Then we have a button which will trigger the Validate() function:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;function Validate()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var file = document.form1.file.value;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // create an array in order to check the correct .xml extension in file&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var arr_file = file.split(&quot;.&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var ext = arr_file[arr_file.length - 1]&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // check if file is not empty - if not alert the user&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (file == &quot;&quot; || file == &quot;undefined&quot; || file.charAt(0) == &quot; &quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;Please insert a file to check&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // check the file extension (.xml) - if not alert the user&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else if (ext != &quot;xml&quot;)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&quot;The submitted file is not an XML file&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; // if everything is ok, then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // create an XMLDOM&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var x = new ActiveXObject(&quot;Microsoft.XMLDOM&quot;);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // load the submitted file&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.async = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.load(file);&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // set the XML parser to true&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.validateOnParse = true;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // check if there are errors&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var errore = x.parseError.errorCode;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if everything&#39;s ok, alert the user&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (errore == 0) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; res.innerHTML = &quot;No error found&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // if errors were found&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // collect error information&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var err_n = x.parseError.errorCode;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var err_d = x.parseError.reason;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var err_r = x.parseError.line;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // show the errors to the user&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with (res)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerHTML&amp;nbsp; = &quot;Error number &quot; + err_n + &quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerHTML += &quot; - &quot; + err_d + &quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerHTML += &quot;line &quot; + err_r + &quot;&amp;lt;br&amp;gt;&quot;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // close the parser&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x.Close();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
I decided to leave the comments in the code itself, so it will be easier to understand what it is actually doing.&lt;br /&gt;
Now, you may wonder what &lt;i&gt;res&lt;/i&gt; is.&amp;nbsp; Well, it&#39;s quite easy: we use a HTML element to show the results of the validation process. So somewhere on the page we need to insert the following:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div id=&quot;res&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
That&#39;s the place where the results will appear.&lt;br /&gt;
&lt;br /&gt;
Let me know what you think. &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5988473534185915405/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-xml-validate-xml-document.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5988473534185915405'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5988473534185915405'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-xml-validate-xml-document.html' title='JavaScript &amp; XML: validate an XML document'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6895938838164655746</id><published>2012-11-27T07:00:00.000+01:00</published><updated>2012-11-27T07:00:08.224+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".test"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="RegEx"/><category scheme="http://www.blogger.com/atom/ns#" term="regular expression"/><category scheme="http://www.blogger.com/atom/ns#" term="URL"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><title type='text'>JavaScript: validate an URL</title><content type='html'>I&#39;ve already posted an article on how to &lt;a href=&quot;http://thewebthought.blogspot.com/2011/12/javascript-validate-forms-with-regular.html&quot; target=&quot;_blank&quot;&gt;validate forms with Regular Expression&lt;/a&gt;. But, have you ever needed to valid an &lt;b&gt;URL&lt;/b&gt;?&lt;br /&gt;
We can do it quite easily using &lt;b&gt;Regular Expressions&lt;/b&gt; and &lt;b&gt;JavaScript&lt;/b&gt;. Specifically we are going to use the &lt;b&gt;.test&lt;/b&gt; method.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The first thing we need to do is set two variables: one is the URL to be validated, the second is the Regular Expression. &lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
var url = &quot;http://www.google.com/&quot;;&lt;br /&gt;
var urlCheck = /^http:\/\/(www\.)?[a-zA-Z0-9-]{3,}\.[a-zA-Z]{2,}(\/)?$/;&lt;/code&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;Now we can check the url using a snippet like:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
if (urlCheck.test(url) == false)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; alert(&quot;URL is not correct!&quot;);&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; alert(&quot;URL correct!&quot;);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
According to the URL specified in the &lt;i&gt;url &lt;/i&gt;variable, we will receive an alert message: if the url is correct or not.&lt;br /&gt;
Now, remember that the above is just an example to show the .test method. Depending on the if clause, we can create different results. For example in a form we can be sure that the submitted url is a valid one and not a fake one. Or anything else.&lt;br /&gt;
&lt;br /&gt;
Nice and easy.&lt;br /&gt;
&lt;br /&gt;
Enjoy yourself, and take care.&lt;br /&gt;
&lt;br /&gt;
Oh! By the way, don&#39;t you think it&#39;s time to drop a line? So, just use the comments section below!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/6895938838164655746/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-validate-url.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6895938838164655746'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6895938838164655746'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-validate-url.html' title='JavaScript: validate an URL'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-4478874568790304462</id><published>2012-11-22T07:00:00.000+01:00</published><updated>2012-11-22T07:00:05.642+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="date"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="last updated"/><category scheme="http://www.blogger.com/atom/ns#" term="lastModified"/><title type='text'>JavaScript: document.lastModified with a trick</title><content type='html'>Again another JavaScript article...&lt;br /&gt;
This post in fact might be interesting for some of you. We are talking about those fancy lines we sometimes find at the end of a web page where we are informed about the document last modification date. Something like:&lt;br /&gt;
&lt;br /&gt;
&lt;script language=&quot;javascript&quot;&gt;
document.write(&quot;&lt;i&gt;Last updated &quot;+document.lastModified+&quot;&lt;/i&gt;&quot;);
&lt;/script&gt;

&lt;br /&gt;
How do we do it automatically?
And... that is not an European date, is it? If so, how can we manipulate it in order to make it European?&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The code is once more very simple:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script language=&quot;javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp; document.write(&quot;&amp;lt;i&amp;gt;Last updated &quot;+document.lastModified+&quot;&amp;lt;i&amp;gt;&quot;);&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
As you can see the output will be:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&lt;i&gt;Last updated 11/17/2012 ... ....&lt;/i&gt;&lt;/code&gt;&lt;/blockquote&gt;
The date is in the format: month/day/year.&lt;br /&gt;
We can actually manipulate the output and give it different form by using the following function:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
function Agg()&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp; this.length = Agg.arguments.length;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; for (var i=0; i&amp;gt;this.length; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this[i + 1] = Agg.arguments[i];&lt;br /&gt;
&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
}&lt;br /&gt;
var gg = new Agg();&lt;br /&gt;
&amp;nbsp;gg[0] = &quot;Sunday&quot;;&lt;br /&gt;
&amp;nbsp;gg[1] = &quot;Monday&quot;;&lt;br /&gt;
&amp;nbsp;gg[2] = &quot;Tuesday&quot;;&lt;br /&gt;
&amp;nbsp;gg[3] = &quot;Wednesday&quot;;&lt;br /&gt;
&amp;nbsp;gg[4] = &quot;Thursday&quot;;&lt;br /&gt;
&amp;nbsp;gg[5] = &quot;Friday&quot;;&lt;br /&gt;
&amp;nbsp;gg[6] = &quot;Saturday&quot;;&lt;br /&gt;
var mm = new Agg();&lt;br /&gt;
&amp;nbsp;mm[0]  = &quot;January&quot;;&lt;br /&gt;
&amp;nbsp;mm[1]  = &quot;February&quot;;&lt;br /&gt;
&amp;nbsp;mm[2]  = &quot;March&quot;;&lt;br /&gt;
&amp;nbsp;mm[3]  = &quot;April&quot;;&lt;br /&gt;
&amp;nbsp;mm[4]  = &quot;May&quot;;&lt;br /&gt;
&amp;nbsp;mm[5]  = &quot;June&quot;;&lt;br /&gt;
&amp;nbsp;mm[6]  = &quot;July&quot;;&lt;br /&gt;
&amp;nbsp;mm[7]  = &quot;August&quot;;&lt;br /&gt;
&amp;nbsp;mm[8]  = &quot;September&quot;;&lt;br /&gt;
&amp;nbsp;mm[9]  = &quot;October&quot;;&lt;br /&gt;
&amp;nbsp;mm[10] = &quot;November&quot;;&lt;br /&gt;
&amp;nbsp;mm[11] = &quot;December&quot;;&lt;br /&gt;
var dd = new Date(document.lastModified);&lt;br /&gt;
&amp;nbsp;with (document)&lt;br /&gt;
&amp;nbsp;{&lt;br /&gt;
&amp;nbsp; write(&quot;Page last update on &quot;);&lt;br /&gt;
&amp;nbsp; write(gg[(dd.getDay())], &quot; &quot;);&lt;br /&gt;
&amp;nbsp; write(dd.getDate(), &quot; &quot;);&lt;br /&gt;
&amp;nbsp; write(mm[(dd.getMonth())], &quot; &quot;);&lt;br /&gt;
&amp;nbsp; write(&quot; &quot;, dd.getFullYear());&lt;br /&gt;
&amp;nbsp; write(&quot; &quot;);&lt;br /&gt;
&amp;nbsp; write(dd.getHours(), &quot;:&quot;);&lt;br /&gt;
&amp;nbsp; write((dd.getMinutes()&amp;lt;10?&#39;0&#39;:&#39;&#39;) + dd.getMinutes(), &quot;:&quot;);&lt;br /&gt;
&amp;nbsp; write((dd.getSeconds()&amp;lt;10?&#39;0&#39;:&#39;&#39;) + dd.getSeconds());&lt;br /&gt;
}&lt;/code&gt;&lt;/blockquote&gt;
And the result will be:&lt;br /&gt;
&lt;script&gt;

function Agg()

{

   this.length = Agg.arguments.length;

   for (var i=0; i&gt;this.length; i++)

   {

     this[i + 1] = Agg.arguments[i];

   }

}

var gg = new Agg();

 gg[0] = &quot;Sunday&quot;;

 gg[1] = &quot;Monday&quot;;

 gg[2] = &quot;Tuesday&quot;;

 gg[3] = &quot;Wednesday&quot;;

 gg[4] = &quot;Thursday&quot;;

 gg[5] = &quot;Friday&quot;;

 gg[6] = &quot;Saturday&quot;;

var mm = new Agg();

 mm[0] = &quot;January&quot;;

 mm[1] = &quot;February&quot;;

 mm[2] = &quot;March&quot;;

 mm[3] = &quot;April&quot;;

 mm[4] = &quot;May&quot;;

 mm[5] = &quot;June&quot;;

 mm[6] = &quot;July&quot;;

 mm[7] = &quot;August&quot;;

 mm[8] = &quot;September&quot;;

 mm[9] = &quot;October&quot;;

 mm[10] = &quot;November&quot;;

 mm[11] = &quot;December&quot;;

var dd = new Date(document.lastModified);

 with (document)

 {

  write(&quot;Page last update on &quot;);

  write(gg[(dd.getDay())], &quot; &quot;);

  write(dd.getDate(), &quot; &quot;);

  write(mm[(dd.getMonth())], &quot; &quot;);

  write(&quot; &quot;, dd.getFullYear());

  write(&quot; &quot;);

  write(dd.getHours(), &quot;:&quot;);

  write((dd.getMinutes()&lt;10?&#39;0&#39;:&#39;&#39;) + dd.getMinutes(), &quot;:&quot;);

  write((dd.getSeconds()&lt;10?&#39;0&#39;:&#39;&#39;) + dd.getSeconds());

 }

&lt;/script&gt; &lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/4478874568790304462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-documentlastmodified-with.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4478874568790304462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/4478874568790304462'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-documentlastmodified-with.html' title='JavaScript: document.lastModified with a trick'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5085078130462782612</id><published>2012-11-20T07:00:00.000+01:00</published><updated>2012-11-20T07:00:11.301+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="CharSet"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="mine type"/><title type='text'>JavaScript: check the mime type and charset</title><content type='html'>I always underestimated &lt;b&gt;JavaScript&lt;/b&gt;. I know it has been a problem for me, because I&#39;ve really missed lots of interesting things until I decided to explore the programming language.&lt;br /&gt;
In the following article I will show one of the useful things we can do with JavaScript: discover the &lt;b&gt;charset&lt;/b&gt; and &lt;b&gt;mime type&lt;/b&gt; of a web page.&lt;br /&gt;
You might wonder what&#39;s the use of it. Well... as usual try to broaden your view and consider the fact that every visitor is visiting your beloved web site from somewhere in the wide world, sitting on a different kind of chair (if not standing or lying), with a different piece of technology or device, and finally (but I could go on forever) with a specific browser ... ... type and version (the mixture of the two is a deadly issue for any web developer).&lt;br /&gt;
Ok, said that, don&#39;t you think that knowing the mime type and charset of a page might be useful?&lt;br /&gt;
Let&#39;s see how to do the magic.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;The code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
The code is quite simple: we are going to use two properties for the document object: mimeType and defaultCharset.&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
var mT = document.mimeType;&lt;br /&gt;
var cS = document.defaultCharset;&lt;br /&gt;
with (document)
{&lt;br /&gt;
write(&quot;Mime Type = &quot; + mT);&lt;br /&gt;
write(&quot;&amp;lt;br&amp;gt;&quot;);&lt;br /&gt;
write(&quot;Charset = &quot; + cS);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
Just put the above in your document and see what comes out.&lt;br /&gt;
Now that you know how to get those values, you might image what you can do. For example we can send the user an alert when the two properties are not met by the target browser.&lt;br /&gt;
&lt;br /&gt;
Ok folks... see ya next time!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5085078130462782612/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-check-mime-type-and-charset.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5085078130462782612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5085078130462782612'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-check-mime-type-and-charset.html' title='JavaScript: check the mime type and charset'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-5812618730971315659</id><published>2012-11-15T07:00:00.000+01:00</published><updated>2012-11-15T07:00:02.186+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="cookies"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="plug-in"/><title type='text'>jQuery: cookies!</title><content type='html'>I&#39;ve already talked about &lt;a href=&quot;http://thewebthought.blogspot.com/2010/09/asp-do-you-like-cookies.html&quot; target=&quot;_blank&quot;&gt;cookies&lt;/a&gt;. We explored the way to use them with ASP, but have you ever wondered how to manage them with &lt;b&gt;jQuery&lt;/b&gt;?&lt;br /&gt;
&lt;br /&gt;
This is a very short article because I don&#39;t want re-write an already made guide...&lt;br /&gt;
We are talking about a jQuery plug-in called &lt;a href=&quot;https://github.com/carhartl/jquery-cookie&quot;&gt;jquery-cookie&lt;/a&gt; which allows us to manage everything about &lt;b&gt;cookies &lt;/b&gt;with jQuery.&lt;br /&gt;
We will be able to read, create and delete cookie sessions. The plug-in can manage session expiration and it can be configured in order to define a valid path for cookies.&lt;br /&gt;
&lt;br /&gt;
Just go to the above page and see for yourself...&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/5812618730971315659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/jquery-cookies.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5812618730971315659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/5812618730971315659'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/jquery-cookies.html' title='jQuery: cookies!'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-8744479306570842689</id><published>2012-11-13T07:00:00.000+01:00</published><updated>2012-11-13T07:00:04.779+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="export"/><category scheme="http://www.blogger.com/atom/ns#" term="import"/><category scheme="http://www.blogger.com/atom/ns#" term="ms access"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL Server Management Studio"/><title type='text'>SQL Server: import a MS Access database</title><content type='html'>As I wrote in a past article, &lt;b&gt;MS Access&lt;/b&gt; can be used to manage databases for a dynamic web site. However, some times, it is not enough and its features can be not enough. In those cases we really need to move to a more performing software like &lt;b&gt;SQL Server&lt;/b&gt;.&lt;br /&gt;
Especially in situations were large quantities of information are managed by a dynamic web site, SQL Server can be a great solution.&lt;br /&gt;
If you are a reader of the web thought, you know how much I am a fan of SQL Server. so in this short post I will explain how to &lt;b&gt;import an Access database to SQL Server&lt;/b&gt;... a few steps and we will ready to go.&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;First things first&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
There are two different ways of converting an Access database into a SQL Server database. One is from the MS Access point of view: upsizing a database (export). The other way consists in importing an Access database into SQL Server.&lt;br /&gt;
In this article we are going to see the second way, which in my opinion is much more secure and easy to execute.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Import &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
We are going to use the import feature in SQL Server Management Studio. To do so we need to select our database, right click and then select &quot;Tasks/Import Data...&quot;.&lt;br /&gt;
Doing so, the import wizard will open.&lt;br /&gt;
First, select as data source &quot;Microsoft Access&quot;. After that, we need to select the Ms Access file name, by pressing browse.&lt;br /&gt;
After clicking on the next button, we need to decide where we want to&amp;nbsp; import the database. Destination will be &quot;SQL Server&quot;. Select the SQL server name and the database. Now, be careful when completing the dialog box section about user authentication: decide if you want to use Windows or SQL Server authentication.&lt;br /&gt;
The next import procedure step is about the way to import data. We can copy data from one or more table or views, or we can write a query to specify the data to transfer. We assume we are going to import data from a table, so we select the first option.&lt;br /&gt;
In the next step, we can select the sources by ticking next to the table/s we would like to import.&lt;br /&gt;
After clicking on the next button, and after just a moment (or maybe more than a moment depending on the size of the imported table/s), we will find the MS Access tables just inside the Tables section of our SQL Server database.&lt;br /&gt;
&lt;br /&gt;
Fast and easy.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;A few more tips&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
After importing the tables, we need to check if everything went the way we wanted. There are some basic differences between &lt;a href=&quot;http://thewebthought.blogspot.com/2011/01/sql-server-vs-ms-access-what-should-i.html&quot; target=&quot;_blank&quot;&gt;SQL Server and Access&lt;/a&gt; that we should be taking into account. The import wizard is a great tool and it should take care of most of the dirty work. A good look at what is now inside SQL Server, before using the database, is advisable in any case.&lt;br /&gt;
&lt;br /&gt;
Ok folks... that&#39;s all for today.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/8744479306570842689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/sql-server-import-ms-access-database.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8744479306570842689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/8744479306570842689'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/sql-server-import-ms-access-database.html' title='SQL Server: import a MS Access database'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-6243878320100116055</id><published>2012-11-08T07:00:00.000+01:00</published><updated>2012-11-08T07:00:07.740+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="canvas"/><category scheme="http://www.blogger.com/atom/ns#" term="create QR code"/><category scheme="http://www.blogger.com/atom/ns#" term="decode"/><category scheme="http://www.blogger.com/atom/ns#" term="encode"/><category scheme="http://www.blogger.com/atom/ns#" term="JavaScript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="jquery.qrcode"/><category scheme="http://www.blogger.com/atom/ns#" term="jsqrcode"/><category scheme="http://www.blogger.com/atom/ns#" term="qr code"/><title type='text'>jQuery and JavaScript: generate and read a QR Code</title><content type='html'>Hello everybody!&lt;br /&gt;
today we are going to see something really interesting that someone in the past asked me via email.&lt;br /&gt;
We are going to generate a &lt;b&gt;QR code&lt;/b&gt; using a &lt;b&gt;jQuery &lt;/b&gt;plug in and then we are going to use a &lt;b&gt;JavaScript&lt;/b&gt; library to read the very same QR code.&lt;br /&gt;
What do you think, is it interesting enough?&lt;br /&gt;
&lt;br /&gt;
&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Generate the QR code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
In order to generate the QR code we just need to use a small jQuery plug in called 
&lt;a href=&quot;http://jeromeetienne.github.com/jquery-qrcode/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jquery.qrcode.js&lt;/a&gt; which is a &lt;i&gt;&quot;jQuery plugin for a pure browser qrcode generation&quot;&lt;/i&gt;.&lt;br /&gt;
As explained in the plug in page, the creation of a QR code is pretty straightforward:&lt;br /&gt;
1) include the plugin:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery.qrcode.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
2) Insert the target container:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;div id=&quot;qrcode&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
3) Generate the QR code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
jquery(&#39;#qrcode&#39;).qrcode(&quot;the web thought&quot;);&lt;/code&gt;&lt;/blockquote&gt;
The plug in can render the QR code in canvas or in table.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #6fa8dc;&quot;&gt;&lt;b&gt;Read a QR code&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
Reading a QR code is different stuff: we can use &lt;a href=&quot;https://github.com/LazarSoft/jsqrcode&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;jsqrcode.js&lt;/a&gt;. The idea here is similar to the creation.&lt;br /&gt;
We need to include the libraries as explained in the above Github page (see Readme file).&lt;br /&gt;
To decode a QR code, we can use the following two lines of code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
qrcode.callback = function(data) { alert(data); };&lt;br /&gt;
qrcode.decode(&quot;qrcodeTest.png&quot;);&lt;/code&gt;&lt;/blockquote&gt;
where the qrcodeTest.png is our QR code image that stays in the same folder as the web page containing the above decoding snippet.&lt;br /&gt;
The callback function gets from the data parameter the value resulting from the QR code decode process.&lt;br /&gt;
Just to make things more clear, have a look at the following code:&lt;br /&gt;
&lt;blockquote&gt;
&lt;code&gt;
&amp;lt;script src=&quot;jquery.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;
      QRCode.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;$(document).ready( function() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qrcode.callback = showInfo;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(&quot;#btnDecode&quot;).click(qrCodeDecoder);&lt;br /&gt;&amp;nbsp; })&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; function qrCodeDecoder() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; qrcode.decode(&quot;qrcodeTest.png&quot;)&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp; function showInfo(data) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(data);&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;lt;div&amp;gt;&lt;br /&gt;&amp;lt;img id=&quot;qrcode&quot; src=&quot;qrcodeTest.png&quot;/&amp;gt;&lt;br /&gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;button id=&quot;btnDecode&amp;gt;Decode the QR Code&amp;lt;/button&amp;gt;&lt;/code&gt;&lt;/blockquote&gt;
After including the jQuery and the jsqrcode libraries, we use a button to trigger the call back and the decode of the png file (qrcodeTest.png).&lt;br /&gt;
&lt;br /&gt;
Ok, guys and gals. That&#39;s enough for today.&lt;br /&gt;
As usual if you need more info, just drop a line in the comment section below.&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/6243878320100116055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/jquery-and-javascript-generate-and-read.html#comment-form' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6243878320100116055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/6243878320100116055'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/jquery-and-javascript-generate-and-read.html' title='jQuery and JavaScript: generate and read a QR Code'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6718406939865222936.post-2147716494696391572</id><published>2012-11-06T07:00:00.000+01:00</published><updated>2012-11-06T07:00:06.221+01:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="control panel"/><category scheme="http://www.blogger.com/atom/ns#" term="dashboard"/><category scheme="http://www.blogger.com/atom/ns#" term="drinks"/><category scheme="http://www.blogger.com/atom/ns#" term="html5 ajax"/><category scheme="http://www.blogger.com/atom/ns#" term="widget"/><title type='text'>JavaScript: dashboards with Drinks Toolkit</title><content type='html'>Web applications are evolving rapidly. While only a few years ago we just needed to manage basic operation for - as an example - a company&#39;s&amp;nbsp; intranet, today, we are asked to create effective and attractive pages together with complex functionalities.&lt;br /&gt;
In order to create efficient &lt;b&gt;dashboards&lt;/b&gt;, &lt;b&gt;Drinks Toolkit&lt;/b&gt; is a really valuable helping tool.&lt;br /&gt;
&lt;a href=&quot;http://www.goincompany.com/drinks.php&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Drinks&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjwZ8KjA_3H98v169IPl5sg029GnQdHCR5LBAyQ_QV1mf1Jsbj8hrX9E0643fux0z6N_8J30kPySVYWEJY_d3pDW56cB5JZ6c1LPSoxh4U6GNb4jqN5VG-Fa6Le4rC2rM289GyhyphenhyphenlLn9k/s1600/drinks.jpg&quot; title=&quot;Drinks&quot; /&gt;&lt;/a&gt;It is a &quot;Web-Based widgets to easily develop control panels and dashboards&quot; and it includes a series of widgets each corresponding to a specific tag.&lt;br /&gt;
&lt;br /&gt;
Drinks is &lt;b&gt;HTML5 &lt;/b&gt;powered, using canvas and not needing any Flash.&lt;br /&gt;
It uses &lt;b&gt;AJAX &lt;/b&gt;to gather data and it is cross browser, as long as the target browser is HTML5 compliant. In terms of simplicity, Drinks is really very easy to use, because in order to insert a widget, we just need to insert the related tag (each widget a tag e.g. &amp;lt;knob&amp;gt;).&lt;br /&gt;
Finally it&#39;s basically open source, thus free. In fact there are three possible options: the Open Pack which is a &quot;pay what you want (even nothing)&quot; option, the Business Pack for professionals and the Custom Pack (Choose what you need).&lt;br /&gt;
Ok, that&#39;s all for today. Go to &lt;a href=&quot;http://www.goincompany.com/drinks.php&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Drinks web page&lt;/a&gt; and have a look for yourselves.&lt;br /&gt;
See you on thursday!&lt;div class=&quot;blogger-post-footer&quot;&gt;*** Please consider that some live examples may not be properly displayed by your RSS reader. ***&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://thewebthought.blogspot.com/feeds/2147716494696391572/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-dashboards-with-drinks.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2147716494696391572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6718406939865222936/posts/default/2147716494696391572'/><link rel='alternate' type='text/html' href='http://thewebthought.blogspot.com/2012/11/javascript-dashboards-with-drinks.html' title='JavaScript: dashboards with Drinks Toolkit'/><author><name>Marco Del Corno</name><uri>http://www.blogger.com/profile/00863522198118005628</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjwZ8KjA_3H98v169IPl5sg029GnQdHCR5LBAyQ_QV1mf1Jsbj8hrX9E0643fux0z6N_8J30kPySVYWEJY_d3pDW56cB5JZ6c1LPSoxh4U6GNb4jqN5VG-Fa6Le4rC2rM289GyhyphenhyphenlLn9k/s72-c/drinks.jpg" height="72" width="72"/><thr:total>0</thr:total></entry></feed>