August 26th, 2008
For those of us who wish to take advantage of handy .HTaccess directives but find it complicated have a freeware GUI alternative – HTAccessible!
Unless you work with .htaccess on a daily basis the chances are you haven’t got the exact syntax rolling around in your head when you need it. That’s where HTAccessible comes in. It provides a simple interface for putting together some of the most commonly used Apache directives, without the need for yet another Google search.

HTAccessible - A freeware GUI app for managing .htaccess directives
As you observe in the screenhost above, you can manage the following .htaccess directives:
- Block IP address or a range of it
- Customize error documents
- Prevent hotlinking and save your expensive bandwidth
- Ensure better handling of files by the browser by sending appropriate MIME types
- Select extensions of files that should be parsed with server-side includes, select default pages such as index.php, etc.
- Manage redirects and retain your visitors
- Allow/disallow directory listing or selectively allow/disallow which extensions can be listed.
Choose your directive and it shall create the code snippet for it. Simply copy-paste it into your exisiting .htaccess file or save it as a new .htaccess file.
Download from Download.com
No Comments » |
Downloads |
Permalink
Posted by Rohan Shenoy
August 19th, 2008
This was a problem I faced when I had to add event listeners to elements created in a loop such that the elements should ‘alert’ the value of var i when they are clicked.
I am aware that finding words to precisely describe this problem is difficult for me, but I will try to explain using a practical example. Ex: I am creating a ordered list with ten list-items such that when any of the list-items receives a click, its alerts its item no. For instance, If you click on 3rd list-item, it alerts ‘3′, similarly, ‘5′ is alerted when you click on list-item 5.
Most common approach would be to code something like below:
function my_func()
{
var ol=document.createElement("ol");
document.body.appendChild(ol);
for(var i=1; i<11; i++)
{
var li=document.createElement("li");
li.innerHTML="This is a list item";
li.onclick=function(onClick){alert(i);}
ol.appendChild(li);
}
}
my_func(); |
If you try this out in your browser, you will find that the value ‘11′ is alerted irrespective of the list-item that was clicked.
Workaround:
The trick is let an attribute of the element hold the value, and using the onClick event to alert the title of the element! Ex:
<li title="2" onclick="alert(this.title)">This is a list item</li> |
The code would then look like:
<script type="text/javascript">
function my_func()
{
var ol=document.createElement("ol");
document.body.appendChild(ol);
for(var i=1; i<11; i++)
{
var li=document.createElement("li");
li.innerHTML="This is a list item";
li.setAttribute("title",i);//note this
li.onclick=function(onClick){alert(this.title);}//note this
ol.appendChild(li);
}
}
my_func();
</script> |
Request: Kindly suggest appropriate brief descriptions or ‘tags’ for this entry. Please use the comment system!
3 Comments |
JavaScript/AJAX |
Permalink
Posted by Rohan Shenoy
August 19th, 2008
CodeBank is a small yet valuable freeware that can manage snippets of code. You can create categories such as PHP, SQL, CSS, JavaScript, etc. that can be custom syntax highlighted. Its stores the data in a XML file. The user interface is pleasing with a ‘tree’ of snippets that can be drag-n-dropped with ease.

Codebank screenshot
There is an insignificant bug that prevents from updating the XML database name and shows ‘Unnamed‘ even after altering its properties. For the geeky ones, compare your XML file with the one that came as a sample and add the missing tag and value!
1 Comment |
Downloads |
Permalink
Posted by Rohan Shenoy