Archive

Posts Tagged ‘javascript’

Toggle visibility between none and inline

August 13th, 2008 R Arun Raj No comments

function toggle_it(itemID){
// Toggle visibility between none and inline
if ((document.getElementById(itemID).style.display == ‘none’))
{
document.getElementById(itemID).style.display = ‘inline’;
} else {
document.getElementById(itemID).style.display = ‘none’;
}
}

JavaScript Frame work

June 27th, 2008 R Arun Raj No comments

A powerful javascript frame work.

ProtoType.Js

Prototype is a JavaScript Framework that aims to ease development of dynamic web applications.

Featuring a unique, easy-to-use toolkit for class-driven development and the nicest Ajax library around, Prototype is quickly becoming the codebase of choice for web application developers everywhere.

http://prototypejs.org

JAVA SCRIPT PAGE REFRESH

June 22nd, 2008 R Arun Raj No comments

<a href=”#” onclick=”javascript:window.location.reload();”><strong>refresh</strong></a>

How to validate Phone number Field using Javascript

May 23rd, 2008 R Arun Raj No comments

//phone number validation start
var digits = “0123456789″;
var phoneNumberDelimiters = “()- “;
var validWorldPhoneChars = phoneNumberDelimiters + “+”;
var minDigitsInIPhoneNumber = 10;

function isInteger(s)
{   var i;
for (i = 0; i < s.length; i++)
{
// Check that current character is number.
var c = s.charAt(i);
if (((c < “0″) || (c > “9″))) return false;
}
// All characters are numbers.
return true;
}

function stripCharsInBag(s, bag)
{   var i;
var returnString = “”;
for (i = 0; i < s.length; i++)
{
var c = s.charAt(i);
if (bag.indexOf(c) == -1) returnString += c;
}
return returnString;
}

function checkInternationalPhone(strPhone){
s=stripCharsInBag(strPhone,validWorldPhoneChars);
return (isInteger(s) && s.length >= minDigitsInIPhoneNumber);
}

function Validatephone(Phone){

if (!checkInternationalPhone(Phone)){
alert(“Please Enter a Valid Phone Number”);
return false;
}
return true;
}

// phone validation ends

How to validate image File field using Javascript

May 23rd, 2008 R Arun Raj No comments

<script type=”text/javascript”>
function validateFileExtension(ld) {
if(!/(\.bmp|\.gif|\.jpg|\.jpeg)$/i.test(ld.value)) {
alert(“Invalid image file type.”);
ld.form.reset();
ld.focus();
return false;
}
return true;
}
</script>

How to validate Email Address Using Javascript

May 23rd, 2008 R Arun Raj No comments

<script language=”javascript” type=”text/javascript”>
function checkemail(id) {
var email = document.getElementById(id);
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (!filter.test(email.value)) {
alert(‘Please provide a valid email address’);
email.focus;
return false;
}
return true;
}
</script>

How to validate name field using Javascript

May 22nd, 2008 R Arun Raj No comments

<script language=”javascript” type=”text/javascript”>
function isValidName(id)
{   Element=document.getElementById(id);
if (Element.value==”"||Element.value== 0)
{
alert(“Please Enter your Name.”);
Element.focus();
Element.value=”";
return false;
}
var rg = new RegExp(/^[A-Za-z\s'.]+$/gi);
name=Element.value;
if(String(rg.test(name))==’false’)
{
Element.focus();
Element.value=”";
alert(“Please Enter A valid Name”);
return false;
}
}
</script>

what is web 2.0

March 2nd, 2008 R Arun Raj No comments

The  Web 2.0 is a standard  for the website that allow users to participate . That means user can participate . They can express their feeling and ideas . The web 2.0 websites seems to be very fast even with multimedia content.This is achieved by the use of CSS. The main technology behind web 2.0 is  AJAX. Thats a very good and simple technology derived from the old technologies . It means Asynchronous javascript and XML .

Technologies ,
The core technology behind web 2.0 is ajax . Its a combination of all latest Technologies

Web 2.0 websites typically include some of these features:

Rich Internet application techniques, often Ajax-based
Semantically valid XHTML and HTML markup
Microformats enriching pages with additional semantics
Folksonomies (in the form of tags or tagclouds, for example)
Cascading Style Sheets to separate presentation from content
REST and/or XML- and/or JSON-based APIs
Syndication, aggregation and notification of data in RSS or Atom feeds
Mashups, merging content from different sources, client- and server-side
Weblog publishing tools
forum software, etc., to support user generated content
OpenID for transferrable user identity
Use of Open source software, such as the LAMP stack
 

Disadvantage ,

Do you think web 2.0 is secure ?

it is not secure , comment on it

Categories: web 2.0 Tags: , , ,