<?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: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-9203273211424838287</id><updated>2011-04-21T22:48:46.157-07:00</updated><category term='noselect'/><category term='firefox'/><category term='hack'/><category term='crash'/><category term='css 3'/><category term='loop'/><category term='select'/><category term='list'/><category term='outline'/><category term='browser'/><category term='loop forevercrash'/><category term='ie crash'/><category term='moz'/><category term='mozilla'/><category term='psuedo'/><category term='firefox hack'/><category term='safari crash'/><category term='menu'/><category term='no select'/><category term='ie'/><category term='firefox crash'/><title type='text'>Web Design tips</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://web-developing-tips.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://web-developing-tips.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>K</name><uri>http://www.blogger.com/profile/01762486444458376389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9203273211424838287.post-1138416300585109433</id><published>2008-08-22T11:48:00.000-07:00</published><updated>2008-08-22T12:00:29.719-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ie crash'/><category scheme='http://www.blogger.com/atom/ns#' term='loop'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox hack'/><category scheme='http://www.blogger.com/atom/ns#' term='loop forevercrash'/><category scheme='http://www.blogger.com/atom/ns#' term='firefox crash'/><category scheme='http://www.blogger.com/atom/ns#' term='safari crash'/><category scheme='http://www.blogger.com/atom/ns#' term='crash'/><category scheme='http://www.blogger.com/atom/ns#' term='hack'/><category scheme='http://www.blogger.com/atom/ns#' term='browser'/><title type='text'>Crashing most browsers:</title><content type='html'>The following code is one I made to cause browsers to loop forever, and either crash, or cause an irritation to the user. In safari and other browsers, every few seconds the "Slow Script" dialogue box shows, which means that window can not be used.&lt;br /&gt;&lt;br /&gt;Here is the code, I submitted it to some browsers, namely safari and firefox and I either received no reply, or nothing happened. This is one of the many variations that can be made, I've chosen the easiest one to understand:&lt;br /&gt;&lt;br /&gt;function m(){&lt;br /&gt;i=0;&lt;br /&gt;while(i&lt;10000){&lt;br /&gt;        try{&lt;br /&gt;                document.write("Hello World&lt;br&gt;");&lt;br /&gt;                delete m();&lt;br /&gt;                document.write("Hello World&lt;br&gt;");&lt;br /&gt;        }&lt;br /&gt;        catch(e){&lt;br /&gt;                new m();&lt;br /&gt;                i++;&lt;br /&gt;        }&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;m();&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;How it works.&lt;br /&gt;while(i&lt;10000){&lt;br /&gt;This makes the script loop ten thousand times, while(true) may also work, but I haven't tried.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;try{&lt;span style="font-style:italic;"&gt;stuff here&lt;/span&gt;}catch(e){&lt;span style="font-style:italic;"&gt;stuff here&lt;/span&gt;}&lt;br /&gt;The try statement checks if there is an error or exception in the code it holds, if there is it uses code in the catch statement. So if a too many recursions, stack overflow (or what ever you want to call it) error occurs, the code inside catch gets executed (see below).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;document.write("Hello World&lt;br&gt;");&lt;br /&gt;delete m();&lt;br /&gt;document.write("Hello World&lt;br&gt;");&lt;br /&gt;This writes "Hello World" on the page, and "deletes" the function m.&lt;br /&gt;&lt;br /&gt;new m();&lt;br /&gt;This creates a new instance of the function m, when the original one is stopped by the browser because of the too many recursions error. Because it is a new instance, it is not prevented from executing because, even though it is a clone object of the original, it is starting executing from scratch. When that new instance is stopped, then the catch creates a new instance of the object and that is then executed.&lt;br /&gt;&lt;br /&gt;(NOTE: in the above example, the new m() just creates a new instance of m, which (to my knowledge) is not executed, the original m is executed.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9203273211424838287-1138416300585109433?l=web-developing-tips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-developing-tips.blogspot.com/feeds/1138416300585109433/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9203273211424838287&amp;postID=1138416300585109433' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/1138416300585109433'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/1138416300585109433'/><link rel='alternate' type='text/html' href='http://web-developing-tips.blogspot.com/2008/08/crashing-most-browsers.html' title='Crashing most browsers:'/><author><name>K</name><uri>http://www.blogger.com/profile/01762486444458376389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9203273211424838287.post-2386311574222189730</id><published>2008-07-24T15:12:00.000-07:00</published><updated>2008-07-24T16:02:38.941-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='no select'/><category scheme='http://www.blogger.com/atom/ns#' term='ie'/><category scheme='http://www.blogger.com/atom/ns#' term='moz'/><category scheme='http://www.blogger.com/atom/ns#' term='noselect'/><category scheme='http://www.blogger.com/atom/ns#' term='select'/><category scheme='http://www.blogger.com/atom/ns#' term='psuedo'/><category scheme='http://www.blogger.com/atom/ns#' term='hack'/><category scheme='http://www.blogger.com/atom/ns#' term='css 3'/><title type='text'>Don't select that!</title><content type='html'>Sometimes you don't want a user to be able to select a part of your website, look at the below? You &lt;span style="font-style: italic;"&gt;may&lt;/span&gt; not be able to select the h1 element:&lt;br /&gt;&lt;br /&gt;&lt;h1 ondragstart="return false" onselectstart="return false"&gt;Don't Select!&lt;/h1&gt;&lt;br /&gt;&lt;style type="text/css"&gt;h1{-moz-user-select:none;background-color:#99CCFF;color:#FFF;padding:5px;cursor:pointer;}h1::selection{color:inherit;background:inherit;&lt;/style&gt;&lt;br /&gt;This is achieved by the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre style="font-weight:bold"&gt;&lt;span style="color:#840084;"&gt;&amp;lt;style &lt;span style="color:#FF0000;"&gt;type=&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;"text/css"&lt;/span&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="color:#0066FF"&gt;h1&lt;/span&gt;{&lt;br /&gt; &lt;span style="color:#000;"&gt;&lt;span style="color:#FF9966;"&gt;-moz-user-select&lt;/span&gt;:&lt;span style="color:#008484;"&gt;none&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#000;"&gt;&lt;span style="color:#FF9966;"&gt;-moz-user-focus&lt;/span&gt;:&lt;span style="color:#008484;"&gt;ignore&lt;/span&gt;;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#000;"&gt;&lt;span style="color:#FF9966;"&gt;cursor&lt;/span&gt;:&lt;span style="color:#008484;"&gt;pointer;&lt;/span&gt;&lt;/span&gt;&amp;nbsp; &lt;span style="color:#CCC;"&gt;/* There's no point in having a &lt;br /&gt;text cursor if you can't select the text */&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#000;"&gt;&lt;span style="color:#0066FF"&gt;h1&lt;/span&gt;&lt;span style="color:#FF00FF"&gt;::selection&lt;/span&gt;{&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#000;"&gt;&lt;span style="color:#FF9966;"&gt;background&lt;/span&gt;:&lt;span style="color:#008484;"&gt;inherit;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt; &lt;span style="color:#000;"&gt;&lt;span style="color:#FF9966;"&gt;color&lt;/span&gt;:&lt;span style="color:#008484;"&gt;inherit;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;}&lt;br /&gt;&lt;span style="color:#840084;"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;The above works in two ways. First off, if the users browser uses a gecko layout engine, then -moz-user-select:none prevents the user from selection text, and -moz-user-focus prevents the dragging of the text in firefox 3.&lt;br /&gt;&lt;br /&gt;In other browsers (*i think* KHTML and/or webkit) if the users browser supports the CSS 3 psuedo selector ::selection, e.g. Apple Safari browser, then the colour of the text which is selected is the same as the colour when it is not selected(this is due to the color property being set to inherit). This is the same for the background property.&lt;br /&gt;&lt;br /&gt;Just a note, notice it is ::selection, not :selection. This is because ::selection is a CSS 3 psuedo elements, and it has been decided within the CSS 3 specification that psuedo elements are identified by two colons (::).&lt;br /&gt;&lt;br /&gt;Furthermore it is now a good time to point out that if a psuedo element is used which a browser does not recognise, e.g. ::-moz-selection (gecko equivalent to the ::selection) in a non-gecko browser, then the whole block is ignored, for instance:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre style="font-weight:bold"&gt;&lt;br /&gt;&lt;span style="color:#0066FF"&gt;h1&lt;/span&gt;&lt;span style="color:#FF00FF"&gt;::-moz-selection&lt;/span&gt;, &lt;span style="color:#0066FF"&gt;h1&lt;/span&gt;&lt;span style="color:#FF00FF"&gt;::selection &lt;/span&gt;{}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;this will result in the whole block being ignored by all browsers [that support the selection psuedo], due to the fact that they will only support one or the other, and W3C specs say that this is the case.&lt;br /&gt;&lt;br /&gt;Finally, getting the no select to work in IE. Internet explorer doesn't support any of the above selection-preventing CSS, so instead we have to use IE specific events: &lt;code style="display:inline"&gt;&lt;pre style="font-weight:bold;display:inline"&gt;&lt;span style="color:#FF0000;"&gt;ondragstart&lt;/span&gt;&lt;/pre&gt;&lt;/code&gt; &amp;nbsp;and &lt;code style="display:inline"&gt;&lt;pre style="font-weight:bold;display:inline"&gt;&lt;span style="color:#FF0000;"&gt;onselectstart&lt;/span&gt;&lt;/pre&gt;&lt;/code&gt;.&lt;br /&gt;&lt;br /&gt;To these events, we add "&lt;code style="display:inline"&gt;&lt;pre style="font-weight:bold;display:inline"&gt;&lt;span style="color:#840084;"&gt;return false&lt;/span&gt;&lt;/pre&gt;&lt;/code&gt;", so we have:&lt;br /&gt;&lt;code&gt;&lt;pre style="font-weight:bold"&gt;&lt;br /&gt;&lt;span style="color:#840084;"&gt;&amp;lt;h1&lt;/span&gt; &lt;span style="color:#FF0000;"&gt;ondragstart=&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;"&lt;span style="color:#840084;"&gt;return false&lt;/span&gt;"&lt;/span&gt; &lt;span style="color:#FF0000;"&gt;onselectstart=&lt;/span&gt;&lt;span style="color:#0000FF;"&gt;"&lt;span style="color:#840084;"&gt;return false&lt;/span&gt;"&lt;/span&gt;&lt;span style="color:#840084;"&gt;&amp;gt;&lt;/span&gt;&lt;br /&gt; Don't Select!&lt;span style="color:#840084;"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9203273211424838287-2386311574222189730?l=web-developing-tips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-developing-tips.blogspot.com/feeds/2386311574222189730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9203273211424838287&amp;postID=2386311574222189730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/2386311574222189730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/2386311574222189730'/><link rel='alternate' type='text/html' href='http://web-developing-tips.blogspot.com/2008/07/dont-select-that.html' title='Don&apos;t select that!'/><author><name>K</name><uri>http://www.blogger.com/profile/01762486444458376389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9203273211424838287.post-1266160719655282952</id><published>2008-07-03T08:12:00.000-07:00</published><updated>2008-07-24T16:05:56.042-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='firefox'/><category scheme='http://www.blogger.com/atom/ns#' term='outline'/><category scheme='http://www.blogger.com/atom/ns#' term='list'/><category scheme='http://www.blogger.com/atom/ns#' term='menu'/><category scheme='http://www.blogger.com/atom/ns#' term='mozilla'/><title type='text'>Outline</title><content type='html'>When users click links, like &lt;a href="#"&gt;this&lt;/a&gt;, depending on the browser an outline will be rendered around the link. This is great for accessibility, however graphic intense components of web pages can look poor when user clicks of them, for example navigation bars. To get around this, you can use the following CSS:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre style="font-weight:bold"&gt;&lt;br /&gt;&lt;span style="color:#0066FF"&gt;a&lt;/span&gt;&lt;span style="color:#FF00FF"&gt;:focus&lt;/span&gt;, &lt;span style="color:#0066FF"&gt;a&lt;/span&gt;&lt;span style="color:#FF00FF"&gt;:active&lt;/span&gt;{&lt;br /&gt;   &lt;span style="color:#FF9966;"&gt;outline&lt;/span&gt;:&lt;span style="color:#008484;"&gt;none&lt;/span&gt;;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This works in mozilla firefox, and although I haven't checked it should work in opera too.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9203273211424838287-1266160719655282952?l=web-developing-tips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-developing-tips.blogspot.com/feeds/1266160719655282952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9203273211424838287&amp;postID=1266160719655282952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/1266160719655282952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/1266160719655282952'/><link rel='alternate' type='text/html' href='http://web-developing-tips.blogspot.com/2008/07/outline.html' title='Outline'/><author><name>K</name><uri>http://www.blogger.com/profile/01762486444458376389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9203273211424838287.post-8914268280061567626</id><published>2008-07-03T08:10:00.001-07:00</published><updated>2008-07-03T08:12:13.978-07:00</updated><title type='text'>Why am I making this blog</title><content type='html'>&lt;span style="font-size:78%;"&gt;&lt;span style="font-family: verdana;"&gt;In my spare time, I sometimes do some web developing, and in doing so I come across some good tips and tricks and create new, helpful codes that many people will find useful. So in this I will share some (hopefully useful) stuff you can use on your site.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/9203273211424838287-8914268280061567626?l=web-developing-tips.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://web-developing-tips.blogspot.com/feeds/8914268280061567626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=9203273211424838287&amp;postID=8914268280061567626' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/8914268280061567626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9203273211424838287/posts/default/8914268280061567626'/><link rel='alternate' type='text/html' href='http://web-developing-tips.blogspot.com/2008/07/why-am-i-making-this-blog.html' title='Why am I making this blog'/><author><name>K</name><uri>http://www.blogger.com/profile/01762486444458376389</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
