<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ladysign Dev Blog &#187; html</title>
	<atom:link href="http://www.ladysign-apps.com/blog/category/code/html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ladysign-apps.com/blog</link>
	<description>Girls can code.</description>
	<lastBuildDate>Mon, 12 Dec 2011 16:58:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Nice search field</title>
		<link>http://www.ladysign-apps.com/blog/code/css/nice-search-field/</link>
		<comments>http://www.ladysign-apps.com/blog/code/css/nice-search-field/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 10:21:46 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[css3]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[search]]></category>
		<category><![CDATA[searchinput]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=1003</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>Advanced HTML5 search field with placeholder and fallback for the other browsers.<br />
Styling with gradient + radius + image [......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/css/nice-search-field/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>Advanced HTML5 search field with placeholder and fallback for the other browsers.<br />
Styling with gradient + radius + image in field.<br />
With JS logics: Search on input string and search on enter.</p>
<p>HTML:</p>
<pre class="brush: xml; title: ;">
&lt;fieldset class=&quot;search&quot;&gt;&lt;div class=&quot;inputsearchgroup&quot;&gt;
&lt;span class=&quot;search_icon&quot;&gt;&lt;/span&gt;
&lt;input type=&quot;hidden&quot; name=&quot;url&quot; value=&quot;search.php&quot;&gt;
&lt;input class=&quot;search&quot; type=&quot;search&quot; placeholder=&quot;Search...&quot; name=&quot;search&quot;&gt;&lt;/div&gt;
&lt;button class=&quot;smallradius submit&quot;&gt;Search&lt;/button&gt;
&lt;/fieldset&gt;
</pre>
<p>CSS:</p>
<pre class="brush: css; title: ;">
fieldset.search {
	border: none;
	padding: 0;
	position: relative;
}

fieldset.search input {
    -webkit-appearance: none;
    -webkit-box-sizing: content-box;
    background: none;
    background: -webkit-gradient(linear, left top, left bottom, from(rgba(250, 250, 250, 1)), to(rgba(250, 250, 250, 0)), color-stop(.3,rgba(250, 250, 250, 0))););
    background-image: -moz-linear-gradient(rgba(250, 250, 250, 1) 0%, rgba(255, 255, 255, 0) 30%);
    border: 1px solid #f2f2f3;
    float: left;
    margin-right: 5px;
    padding: 10px 0 10px 44px;
    background-color: #fff;
}

fieldset.search div.inputsearchgroup {
	position: relative;
	float: left;
}

fieldset.search div.inputsearchgroup span.search_icon {
	background: url(icon_search_glass.png) no-repeat 10px 7px;
	display: inline-block;
	position: absolute;
	top: 0;
	left: 0;
	width: 37px;
	height: 33px;
}

/*
 * CSS3
 */
.smallradius {
	-moz-border-radius: 3px;
	-webkit-border-radius: 3px;
	border-radius: 3px;
}
</pre>
<p>JS:</p>
<pre class="brush: jscript; title: ;">
(function(){
	/*
	 * jQuery PlaceHolder + Search Submit
	 * it submits the search query on enter button and on search button.
	 * place holder functionality for browsers which don't support placeholder
	 * @author Lee Boonstra
	 * @since 21 jan 2011
	 * @version 1.0
	 *
	 * @uses jQuery 1.2.6, &lt;http://www.jquery.com&gt; or higher
	 */
	$.fn.SearchInput = function(){
		var strSavedString = &quot;&quot;;

		/*
		 * Does the browser support placeholder attribute?
		 * @return boolean
		 */
		function isBrowserSupport(){
			var i = document.createElement(&quot;input&quot;);
			return &quot;placeholder&quot; in i;
		}
		return this.each(function(){
			var button = $(this).parent().parent().find('.submit');
			var url = $(this).parent().find('input[name|=url]').val();
			var e = $(this);

			var strPlaceHolderText = e.attr(&quot;placeholder&quot;);

			if(e.val().length == 0){
				e.val(strPlaceHolderText);
			}

			/*
			 * On field focus remove placeholder if there is no written text in it.
			 * @return void
			 */
			e.focus(function(){
				strSavedString = e.val();
				if (strSavedString === strPlaceHolderText) {
					e.val(&quot;&quot;);
				}
			});

			/*
			 * Save the written text in a variable
			 * @return void
			 */
			e.change(function(){
				strSavedString = e.val();
			});

			/*
			 * While leaving the focus of the field, put the placeholder back
			 * or the written text.
			 * @return void
			 */
			e.blur(function(){
				if(isBrowserSupport()===false){
					if(strSavedString !== strPlaceHolderText &amp;&amp; strSavedString !== &quot;&quot;){
						e.val(strSavedString);
					} else {
						e.val(strPlaceHolderText);
					}
				}
			});

			/*
			 * Search if the key is enter or button has been clicked,
			 * if there's a input hidden url and the input is not empty and does not contain the    placeholder
			 */
			function search(ev){
				if (ev.keyCode === 13 &amp;&amp; strSavedString !== strPlaceHolderText &amp;&amp; strSavedString !== &quot;&quot; &amp;&amp; url !== null) {
					window.location.href = url + &quot;?q=&quot; + strSavedString;
				}
				if(ev===&quot;click&quot; &amp;&amp; strSavedString !== strPlaceHolderText &amp;&amp; strSavedString !== &quot;&quot; &amp;&amp; url !== null){
					window.location.href = url + &quot;?q=&quot; + strSavedString;
				}
			}

			/*
			 * Submit the query
			 */
			e.keyup(function(ev){
				search(ev);
			})
			button.click(function(){
				search(&quot;click&quot;);
			});

		});

	};
})(jQuery);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/css/nice-search-field/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sencha Touch app offline</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/sencha-touch-app-offline/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/sencha-touch-app-offline/#comments</comments>
		<pubDate>Wed, 29 Sep 2010 08:01:47 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[ExtJs]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[Ext Js]]></category>
		<category><![CDATA[ipad]]></category>
		<category><![CDATA[offline]]></category>
		<category><![CDATA[sencha touch]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=983</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>This tutorial will help you to put your Sencha Touch ipad app offline.</p>
<p><strong>1. create your cache manifest file</strong><br />
create a file y[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/javascript/sencha-touch-app-offline/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 3 out of 5 stars</p>
<p>This tutorial will help you to put your Sencha Touch ipad app offline.</p>
<p><strong>1. create your cache manifest file</strong><br />
create a file yourappname.manifest in your application root.<br />
In the file enter all files you have to cache to make your app working offline.</p>
<p>for example the app.manifest file looks like this:</p>
<pre class="brush: jscript; title: ;">
CACHE MANIFEST
#rev2

# Explicitly cached entries
CACHE:
index.html

img/icon.png
img/phone_startup.png
img/tablet_startup.png
img/main-image.png

css/ext-touch.css
css/default.css

js/ext-touch-debug.js
js/ext-touch.js
js/index.js

# Resources that require the user to be online.
NETWORK:
js/twitter.js

#If source in inaccessible serve other file. for example: /index.php /index.html
FALLBACK:
</pre>
<p><strong>2. Add your manifest to your application .html file header</strong><br />
In your html file:</p>
<pre class="brush: xml; title: ;">
&lt;!doctype html&gt;
&lt;html manifest=&quot;yourappname.manifest&quot;&gt;
</pre>
<p><strong>3. Create a .htaccess file and add expire configuration for your *.manifest file to your app root.</strong></p>
<pre class="brush: jscript; title: ;">
&lt;Files yourappname.manifest&gt;
    ExpiresActive On
    ExpiresDefault &quot;access&quot;
&lt;/Files&gt;
</pre>
<p><strong>4. Add type manifest to your apache config (apache.conf / vhost.conf or .htaccess file)</strong></p>
<pre class="brush: jscript; title: ;">
AddType text/cache-manifest .manifest
</pre>
<p>That&#8217;s it, now your app should work offline.</p>
<p>You should know that, as soon as the manifest file fails with caching the files. It stops.<br />
That means that the files will not be updated.</p>
<p>Use this code to check/swap cache via code:</p>
<pre class="brush: jscript; title: ;">
var i = -1;

// Convenience array of status values
var cacheStatusValues = [];
 cacheStatusValues[0] = 'uncached';
 cacheStatusValues[1] = 'idle';
 cacheStatusValues[2] = 'checking';
 cacheStatusValues[3] = 'downloading';
 cacheStatusValues[4] = 'updateready';
 cacheStatusValues[5] = 'obsolete';

 // Listeners for all possible events
 var cache = window.applicationCache;
 cache.addEventListener('cached', logEvent, false);
 cache.addEventListener('checking', logEvent, false);
 cache.addEventListener('downloading', logEvent, false);
 cache.addEventListener('error', logEvent, false);
 cache.addEventListener('noupdate', logEvent, false);
 cache.addEventListener('obsolete', logEvent, false);
 cache.addEventListener('progress', logEvent, false);
 cache.addEventListener('updateready', logEvent, false);

 // Log every event to the console
 function logEvent(e) {
 	 i=i+1;
     var online, status, type, message;
     online = (isOnline()) ? 'yes' : 'no';
     status = cacheStatusValues[cache.status];
     type = e.type;
     message = 'online: ' + online;
     message+= ', event: ' + type;
     message+= ', status: ' + status;
     if (type == 'error' &amp;&amp; navigator.onLine) {
         message+= ' There was an unknown error, check your Cache Manifest.';
     }
     log(i + ' ' + message);
 }

 function log(s) {
    //alert(s);
	console.log(s);
 }

 function isOnline() {
     return navigator.onLine;
 }

 if (!$('html').attr('manifest')) {
    log('No Cache Manifest listed on the tag.')
 }

 // Swap in newly download files when update is ready
 cache.addEventListener('updateready', function(e){
         // Don't perform &quot;swap&quot; if this is the first cache
         if (cacheStatusValues[cache.status] != 'idle') {
             cache.swapCache();
             log('Swapped/updated the Cache Manifest.');
         }
     }
 , false);

 // These two functions check for updates to the manifest file
 function checkForUpdates(){
     cache.update();
 }
 function autoCheckForUpdates(){
     setInterval(function(){cache.update()}, 10000);
 }
</pre>
<p>More info&#8217;s, can be found here:<br />
<a href="http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html">http://developer.apple.com/library/safari/#documentation/iPhone/Conceptual/SafariJSDatabaseGuide/OfflineApplicationCache/OfflineApplicationCache.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/sencha-touch-app-offline/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>eFocus number 1 internet full service company</title>
		<link>http://www.ladysign-apps.com/blog/code/css/efocus-number-1-internet-full-service-company/</link>
		<comments>http://www.ladysign-apps.com/blog/code/css/efocus-number-1-internet-full-service-company/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 17:33:25 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[efocus]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=960</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 5 out of 5 stars</p>
<p>Last week the company I work for: eFocus, became number 1 in the <a href="http://www.emerce.nl/artikel.jsp?rubriek=404797&#038;id=2997956">Emerce top 100</a>.<br />
We&#8217;re very happy with this notatio[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/css/efocus-number-1-internet-full-service-company/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 5 out of 5 stars</p>
<p>Last week the company I work for: eFocus, became number 1 in the <a href="http://www.emerce.nl/artikel.jsp?rubriek=404797&#038;id=2997956">Emerce top 100</a>.<br />
We&#8217;re very happy with this notation! </p>
<p><a href="http://www.efocus.nl/algemeen/nieuws/efocus_nummer_1_fullservice_internetbureau_in_emer"><br />
<img src="http://www.ladysign-apps.com/blog/siteimg/efocus.jpg" alt="eFocus #1 internet full service company" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/css/efocus-number-1-internet-full-service-company/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Style sexy submit buttons with CSS</title>
		<link>http://www.ladysign-apps.com/blog/code/css/style-sexy-submit-buttons-with-css/</link>
		<comments>http://www.ladysign-apps.com/blog/code/css/style-sexy-submit-buttons-with-css/#comments</comments>
		<pubDate>Sun, 13 Dec 2009 17:19:57 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[sexy buttons]]></category>
		<category><![CDATA[style]]></category>
		<category><![CDATA[submit button]]></category>

		<guid isPermaLink="false">http://www.ladysign-apps.com/blog/?p=950</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>It&#8217;s nice to style your buttons with CSS. &#8211; For anchor tags, this is easy todo, if you use the <a href="http://www.alistapart.com/articles/slidingdoors/">sliding doors [......]</a></p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/css/style-sexy-submit-buttons-with-css/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 2 out of 5 stars</p>
<p>It&#8217;s nice to style your buttons with CSS. &#8211; For anchor tags, this is easy todo, if you use the <a href="http://www.alistapart.com/articles/slidingdoors/">sliding doors CSS technique</a>.<br />
But it gets nasty when you want to style the submit button, specially if you want the same results in all modern browsers.</p>
<p>What I often see, is in this case, that people create the submit  button via an anchor tag as well. The onsubmit action will be added dynamicly via Javascript. &#8211; Sure this works, but when people disable Javascript (and people do), you can not submit the form. &#8211; Bad accessibility.</p>
<p>The input type submit button is the worse button to style. But there is also a button tag, which can contain a type=submit. This button tag, can contain child tags, just as you do with an anchor tag.<br />
Please see my solution below.</p>
<p>You can download the image files:<br />
<a href="http://www.ladysign-apps.com/blog/siteimg/submit-button-img-span.gif">left main button image</a> | <a href="http://www.ladysign-apps.com/blog/siteimg/submit-button-img-right.gif">right side button image</a></p>
<p><strong>html:</strong></p>
<pre class="brush: xml; title: ;">&lt;p&gt;
&lt;a class=&quot;button&quot; href=&quot;#&quot;&gt;&lt;span class=&quot;right&quot;&gt;&lt;span class=&quot;inner&quot;&gt;Ok&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;button type=&quot;submit&quot; class=&quot;button&quot; href=&quot;#&quot;&gt;&lt;span class=&quot;right&quot;&gt;&lt;span class=&quot;inner&quot;&gt;Submit&lt;/span&gt;&lt;/span&gt;&lt;/button&gt;
&lt;/p&gt;</pre>
<p><strong>css:</strong></p>
<pre class="brush: css; title: ;">.button {
    background: none;
    clear: both;
    cursor: pointer;
    color: #444;
    display: inline-block;
    font: normal 12px arial, sans-serif;
    overflow: hidden;
    text-decoration: none;
    whitespace: no-wrap;
}

.button .inner {
   background: transparent url(../siteimg/submit-button-img-span.gif) no-repeat scroll top left;
   float: left;
}

.button .right {
    background: transparent url('../siteimg/submit-button-img-right.gif') no-repeat scroll top right;
	float: left;
	padding: 0 18px 0 0;
}

a.button span {
	padding: 5px 0 5px 18px;
}

button.button {
	border: none;
	padding: 0;
}

button.button span {
	height: 24px;
	line-height: 24px;
	padding: 0 0 0 15px;
}

.button:active span, .button:hover span {
	color: #000;
	filter: alpha(opacity=70);
	-moz-opacity: 0.7;
	opacity: 0.7;
}</pre>
<p>Check <a href="http://www.ladysign-apps.com/blog/lee/submit-button.html">my demo</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/css/style-sexy-submit-buttons-with-css/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>4 Ways to redirect your websites</title>
		<link>http://www.ladysign-apps.com/blog/code/javascript/4-ways-to-redirect-your-websites/</link>
		<comments>http://www.ladysign-apps.com/blog/code/javascript/4-ways-to-redirect-your-websites/#comments</comments>
		<pubDate>Wed, 15 Jul 2009 17:58:12 +0000</pubDate>
		<dc:creator>Lee</dc:creator>
				<category><![CDATA[browsers]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[accessibility]]></category>
		<category><![CDATA[javascript redirect]]></category>
		<category><![CDATA[meta redirect]]></category>
		<category><![CDATA[redirect]]></category>
		<category><![CDATA[redirecting]]></category>

		<guid isPermaLink="false">http://ladysign-apps.com/blog/?p=805</guid>
		<description><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>4 Ways to redirect your website to another page or path.<br />
For this example I will use the website: http://www.domain.com<br />
L[......]</p><p class='read-more'><a href='http://www.ladysign-apps.com/blog/code/javascript/4-ways-to-redirect-your-websites/'>继续阅读</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>Difficulty:</strong> 1 out of 5 stars</p>
<p>4 Ways to redirect your website to another page or path.<br />
For this example I will use the website: http://www.domain.com<br />
Let&#8217;s say this site is build in the folder: <strong>/folder/</strong> we need a redirect from<br />
<strong>DOMAIN</strong> to <strong>DOMAIN/FOLDER</strong>. I will show you the ways how to do it. You can re-use my code, just use your own domain and folder paths!</p>
<p><strong>The easiest way:</strong><br />
Create in the root of your domain an index.html and use a meta-refresh tag in the <head> of your HTML.<br />
This way of redirecting is according to W3C not so nice, and it also will have a delay.<br />
You can set this delay, however I set it to 0.</p>
<pre class="brush: xml; title: ;">&lt;meta http-equiv=&quot;refresh&quot; content=&quot;0;URL=http://www.domain.com/folder/&quot; /&gt;</pre>
<p><strong>The accessible way:</strong><br />
Not so nice, but to most accessible way, is to just create an empty index.html with an hyperlink<br />
to your new folder.</p>
<pre class="brush: xml; title: ;">Oops, the page you are looking for, does not exist anymore.
&lt;a href=&quot;http://www.domain.com/folder&quot;&gt;Browse to the correct page by following this link&lt;/a&gt;.</pre>
<p><strong>The Javascript way:</strong><br />
A good way to use. However if Javascript is disabled in your browser your stuck on the page where this<br />
Javascript code is placed. (index.html in the root of your domain)</p>
<pre class="brush: jscript; title: ;">&lt;script type=&quot;text/javascript&quot;&gt;
/*&lt;![CDATA[*/
 window.location=&quot;http://www.sandranasicfans.eu/sandranasic/&quot;;
/*]]&gt;*/
&lt;/script&gt;</pre>
<p><strong>The server way:</strong><br />
This will work on Apache linux servers only.<br />
Create with notepad a file called: .htaccess with the below content. Place this file in root of your domain.<br />
Please note that on some servers you can not see this file with your FTP client. I found out that most of the time the webvariant of your hosted server (file manager), will show them.<br />
However, I think this is the best and fastest way of redirecting.</p>
<pre class="brush: jscript; title: ;">RewriteEngine on
rewriterule ^(.*)$ http://www.domain.com/folder/$1 [r=301,nc] </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.ladysign-apps.com/blog/code/javascript/4-ways-to-redirect-your-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

