Category: FromSitesTree.com

Javascript by Example #13

JavaScript by Example: JavaScript by Example: Example 1.1 A simple JavaScript program Run View SourceExample 1.2 An HTML form with a JavaScript event handlerdefined Run View SourceExample 1.3 Estimating Your Taxes with JavaScript Run View SourceExample 6.1 Defining JavaScript Functions ViewSourceExample 6.2 Using Functions as Data ViewSourceExample 6.3 Checking for the Correct Number of Arguments …

Continue reading

How to implement multiple tab webpages in Ajax and Javascript #13

The following two examples will demonstrate how to use javascript and/or ajax to implement multiple tab webpages.http://www.dynamicdrive.com/dynamicindex17/ajaxtabscontent/ http://www.barelyfitz.com/projects/tabber/example2.html I have used the first code extensively in one of my applications.The basic ides is: you define a div section. On each click, you change the contents of that div section using Ajax concepts. You could also …

Continue reading

Handling Checkbox arrays with Javascript::GetElementsByName:XHTML supported #13

The following code demonstrates how to handle checkboxes with javascript. Note the names of all check boxes are same myInput[]. It could also be myInput. Both works as an array to contain the controls’ values. I prefer myInput[] as you can handle this control in PHP as an array. If you use $arr=$_POST[‘myInput’], $arr will …

Continue reading

What you really need to learn in Javascript? #13

What you really need to learn in Javascript? 1. Where you can place JavaScript codes? Anywhere in the web-pages, ideally in the header section, or in an external file. If you keep javascript codes in an external file, the codes will be re-usable from different web-pages2. Some basic programming: document.write(‘Hello World’); This will only be …

Continue reading

Little note on CVS #14

CVS Version Control System: There will be a repository where the files(of different versions) will be saved. Its just like a central storage of files. You will need a software that will provide this facility. You also need a client software. The client software can get copies of the repository files. After, modifying clients can …

Continue reading

Quick reference to sub version’s repository administration commands #14

Sub version administration related commands svnlook:to examine various revisions and transactions in a repository. No change is made by this command. Just analyze near to commit or committed changes. svnadmin: ls repos: check sub version repository svnadmin create “path to repository” svnadmin create –fs-type fsfs /path/to/repos: creates repository that uses FSFS file system svnadmin create …

Continue reading

Good Coding Style in PHP + Other languages #15

Style 1.1: Use proper indenting while ($x < $z) { if ($a == 1) { echo 'A was equal to 1'; } else { if ($b == 2) { //do something } else { //do something else } }} 1.2while ($x < $z) { if ($a == 1) { echo 'A was equal to 1'; …

Continue reading

Some random information regarding commenting your code #15

Some random information regarding commenting your codeIs commenting required? or suggested?Simply yes. Always comment your code.Note: Commenting is always useful only when it is done right. Bad commenting is worse than not commenting.What should you write in the comment?————————————–Write why the section of the code is required.write-What does the code section do.Write it in plain …

Continue reading

Introduction to software version control #14

Version control software are used to maintain and create different versions of the same software. It allows parallel software development and facilitates collaboration and team based software development. In addition, it provides features so that integration among different people’s work can be made. Also, tracking back to an early stage of the software becomes possible. …

Continue reading

PHP Security – Guidelines #16

PHP Security – Guidelines Do not store sensitive information in Cookies Instead of cookies, store sensitive information in Sessions Sessions can also be hacked though safer than cookies PHP session id is pretty random; so in general this is not a problem. Reducing the session security problem: determine current user is the one who originally …

Continue reading