All Entries Tagged With: "javascript"
Toggle visibility between none and inline
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
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
<a href=”#” onclick=”javascript:window.location.reload();”><strong>refresh</strong></a>
How to validate Phone number Field using Javascript
//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 > [...]
How to validate image File field using Javascript
<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
<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
<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
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 [...]



