July 27th, 2009
This is an example for display the selected item from combo box to text field using the JavaScript. Create the javascript code inside the header portion.
<script type=”text/javascript”>
function getSelectedValue( comboBox){
var selectedValue = comboBox.value;
document.getElementById(‘textInput’).value = selectedValue;
}
</script>
Create following code inside the html tag
<select name=”combobox” onchange=”getSelectedValue(this)”>
<option value=”1″>1</option>
<option value=”2″>2</option>
<option value=”3″>3</option>
<option value=”4″>4</option>
<option value=”5″>5</option>
</select>
<input type=”text” id=”textInput” value=”" />
Save the file with yourfilename.html extension.
Click here for Demo
July 26th, 2009
Apache Web server provides the feature .htaccess file, which provides commands to control a website. Htaccess is a simple text file. You can put it in any directory – it then applies to the directory you put it in, and all subdirectories.
The .htaccess file use server side includes, Restrict IPs, Load a default page, Do any host of events invisible to the user. Using this file we can redirect custom error pages (i.e. 404,500 etc) to our error description page.
How we can redirects error pages.
ErrorDocument 404 http://www.anishej.com/404.htm
ErrorDocument 401 http://www.anishej.com
ErrorDocument 403 http://www.anishej.com
Set default Home page/file priorities
DirectoryIndex home.html
The above code is used to set home.html file as the home page of your folder/site instead of the index.html/index.php.
DirectoryIndex home.html index.php index.html
This code is used to set the priorities of the page. The file which check the availability of the home.html and load the page. If not exists will check the index.php file and third priority is index.html file.
Redirection
Redirect /temp http://www.anishej.com/software
This is used to redirect from the folder temp to folder software.
June 28th, 2009
A database is just an efficiently organized collection of data. The database engine,technical name is Database Management System (DBMS), is used to store, retrieve, and modify the data. A good database engine organizes, catalogs, backs up, all with a view toward making that data quicker and easier to work with.
Database Architectures
There are two main options
- Embedded and
- Client/Server
Embedded Database
- Runs and stores all its data on the same machine.
- Database is not networked
- Only one program can connect to it at any given time
- Database cannot be shared between different machine
- Popular examples of the embedded database engines include dBase and DBM and SQLite
Client/Server Database
- It is designed for use over networks
- Enabling multiple users to work simultaneously with the same data
- Database (DBMS) itself act as a server
- A single centralized data store makes important jobs like administration and backup relatively straightforward
- Widely acknowledged big three DBMS are Oracle,DB/2 (from IBM) and SQLServer (from Microsoft)
- Open Source Client Server databases are PostgreSQL and MySQL
Features of Open Source MySQL Database
- It is one of the most popular databases being used on the Web today
- It is free available as a download to install and run on your machine
- It is easy to install on a wide range of Operating Systems (Windows and Unix)
- It is available as a relatively cheap in many Web – hosting packages
- It is simple to use and includes some handy administration tools
- It is fast powerful client/server system that copes well with very large, complex databases,and should stand you in good stead when its comes to large projects.