Power leaking from PC casing

Most of PC users are having troubles with power leaking from their PC casing. There are may have lot of reasons. But most of the time the reason is improper power connection. If you use good power connection with proper 3 pin plug point, then most of the time the problems with power leaking are get solved. We are normally use low price multiplugs for supply power to Monitor, CPU, Speaker/Sub-woofer, Router,Printer, etc. These low price multiplugs have no earth connections for it’s 3 pin outputs. So it is not recommend to use low quality multiplugs for PCs. CPU and Monitor must plugged to 3 pin plug points.

About Prototype popular javaScript framework

Prototype is a JavaScript framework that aims to ease development of dynamic web application. This framework enables you to deal with lot of JavaScript features like Ajax, DOM extensions, JSON objects, etc. Refer following link to get some idea about Prototype JS framework, I’ll give some sample codes for explain how to user these features later.
http://www.prototypejs.org/learn

How to modify or remove php session variables

First you have to open the session for modify or remove session variables.
session_start();

To change a variable, just overwrite it.
$_SESSION[‘name’]=’your_name’;

To remove a single variable in the session.
unset($_SESSION[‘name’]);

To remove all the variables in the session. (without destroying the session)
session_unset();

To destroy the session.
session_destroy();

How to detact javascript is enable or not in the client browser

There are various kind of solution to check the javascript support of client browser. In here I’ll provide a solution to block client access who have not enabled javascript in his/her browser.

In this example I user index.html which clients want to visit. And user enable_js.html which will redirect clients from index.html page when their browser not support to javascript.

<noscript>
<meta equiv=”refresh” content=”0;URL=enable_js.html”>
</noscript>

Add above code into the body (between body tags) of index.html. This part will redirect clients who user browsers which not support for javascript to enable_js.html. If javascript is enable, then nothing happent from this code.


<h2 id=”nojs” style=”font-family: Verdana,Arial,Helvetica,sans-serif; color: rgb(204, 0, 0);”>
JavaScript is turned off in your web browser. Turn it ON (Enable) to access the website, then refresh the page.
</h2>
<script>
document.getElementById(“nojs”).style.display=”none”;
alert(“Javascript enabled successfully! Press ok to continue”);
window.location = “index.html”;
</script>

Add above code into the body of enable_js.html. This will display error massage when javascript is disable in client’s browser. After enable javascript and refresh this page will provide alert with informing the javascript is successfully working. And after press ok it will redirect to the index.html.

%d bloggers like this: