Archive for the ‘JavaScript’ Category

An Website Colorscheme Editor

I’ve worked on a website color scheme editor recently. The main idea was to change the colors and banner of a website. The target website was my recent work with my department’s website.

Well…. There are a lot of color scheme editor available on the web, but I tried something different. I wanted to give the complete control to the administrator. But, uff…. It was really tough.

Main things I had to do was

  • To select a suitable color picker.
  • Then identify the areas the colors should be changed.
  • Store the color information.
  • Generate the CSS file according to the changes.

Read the rest of this entry »

IIS doesn’t support .htaccess!

IIS server doesn’t support .htaccess file!!!

This is a problem for most of us PHP developers. At least for me! Whenever I build a website, the default page is index.php. IIS doesn’t take index.php as the default page. It looks for default.html/index.html etc. I don’t have access to the configuration files of the server. What to do? If anybody have any professional idea, please suggest. I don’t have any idea how to solve this problem.

Then I figured out to use JavaScript. Create an index.html page which will just redirect to the index.php file. Simple… Only a single line to add in the JavaScript code segment:


window.location.href="index.php";

But this method was working for simple website redirection but faced problem when there is some parameters with the URL. Then I figured this following JavaScript code:


var cururl = window.location.href;
var splt = cururl.split('?');
var newurl = 'index.php';
if(splt.length > 1)
{
newurl = 'index.php?'+splt[1];
}
window.location.href = newurl;

I think this would be helpful for some people. If you have any other nice and professional approach to solve this please suggest here.

About
Search
Categories