Posts

Showing posts from September, 2011

VALIDATION JS AND AJAX FORMAT

Image
<br /> <script type="text/javascript"> <br />function validate() <br />{ <br /> <br />var gender=document.regform.gender.value; <br />if(gender=="0" || gender=="") <br />{ <br />alert("Select the field Gender.");document.regform.gender.focus();return false; <br />} <br /> <br />var name=document.regform.name.value; <br />if(name=="0" || name=="" ) <br />{ <br />alert("The Name field is blank."); <br /> <br />document.regform.name.focus();return false; <br />} <br /> <br />re = /^[A-Za-z ]+$/; <br />if(re.test(document.regform.name.value)) <br />{ <br />//alert('Valid Name.'); <br />} <br />else <br />{ <br />alert('Invalid Name ! Only Alphabets are allowed.');document.regform.name.focus();return false; <br />} <br />

Validation for gif,pdf,bmb,jpeg,doc

<br /> <script type="text/javascript"> <br />//<![CDATA[ <br /> <br />function validate() <br />{ <br /> <br /> var title=document.form1.title.value; <br /> if(title==""){ <br /> alert("Please enter the Title of the Book !");document.form1.title.focus();return false; <br /> } <br /> <br /> <br />var pdf =document.form1.pdf.value; <br /> <br /> <br />if(pdf != "" ) <br /> { <br /> if (valupfile(pdf,"Only Upload PDF file!") == false) <br /> { <br /> document.form1.pdf.select(); <br /> return false; <br /> } <br /> } <br /> <br /> <br /> <br />var image =document.form1.image.value; <br /> <br /> <br /> <br />if(image != "" ) <br /> { <br /> if (valupfile1(image,"Only Upload .jpg,.gif,.png

Foreign language characters in my mysql Data Base?

Foreign language characters in my mysql Data Base? Is the connection to the database also UTF-8 encoded? Give this a try: right after connecting to the mysql database, run the following query. SET NAMES utf8; Great! It worked wonderfully! I added $conn->query('SET NAMES utf8'); Thanks again! mysql_query("SET NAMES utf8"); [Google Ads]

URL VALIDATION JS

<br /><!doctype html public "-//w3c//dtd html 4.01 transitional//en"> <br /><html> <br /><head> <br /><title>JavaScrip URL & Email Validation</title> <br /><meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <br /><script type="text/javascript"> <br /><!-- <br />function isValidURL(url){ <br /> var RegExp = /^(([\w]+:)?\/\/)?(([\d\w]|%[a-fA-f\d]{2,2})+(:([\d\w]|%[a-fA-f\d]{2,2})+)?@)?([\d\w][-\d\w]{0,253}[\d\w]\.)+[\w]{2,4}(:[\d]+)?(\/([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)*(\?(&?([-+_~.\d\w]|%[a-fA-f\d]{2,2})=?)*)?(#([-+_~.\d\w]|%[a-fA-f\d]{2,2})*)?$/; <br /> if(RegExp.test(url)){ <br /> return true; <br /> }else{ <br /> return false; <br /> } <br />} <br /> <br />function isValidEmail(email){ <br /> var RegExp = /^((([a-z]|[0-9]|!|#|$|%|&|

Upload temp folder server settings error

upload_tmp_dir = /tmp/

Upload images

$c1 = rand(0,9);$c2 = rand(0,9);$c3 = rand(0,9);$c4 = rand(0,9); $rand = $c1.$c2.$c3.$c4; $dir_path = "album/".$rand.$_FILES['upload1']['name']; $dir_patha = $dir_path; $file=$rand.$_FILES['upload1']['name']; if(move_uploaded_file($_FILES['upload1']['tmp_name'],"../".$dir_path)){

Unlink

unlink($arr1[$y]);

Text focus JS

<br /><input type="text" name="username" style="width:200px" id="username" onfocus="if(this.value=='Enter your Emailid as your username') this.value='';" onblur="if(this.value=='') this.value='Enter your Emailid as your username';" value="Enter your Emailid as your username"/> <br /> <br /> <br /> <br /><script language="JavaScript"> <br /> <br />function validate() <br />{ <br /> <br /> var firstname=document.form1.firstname.value; <br /> if(firstname==""){ <br /> alert("Please enter the your First Name");document.form1.firstname.focus();return false; <br /> } <br /> <br /> var lastname=document.form1.lastname.value; <br /> if(lastname==""){ <br /> alert("Please enter the your Last Name");document.form1.l

SSL, or Secure Socket Layers, is what makes secure sites secure.

SSL, or Secure Socket Layers, is what makes secure sites secure. Here's how it works: When you log onto a secure server it communicates with your browser for a few seconds. During this communication, it sends your browser encryption information that only it and your browser can read. Once this encryption is set, it acts like a normal web page, except that all info coming or going is encrypted. This encryption makes it extremely difficult for any third party who would intercept the transaction to decipher it. (All this extra protection is why secure servers seem to run slower than their unsecured counterparts.) Secure connections only protect the info as its coming and going, not when it's just sitting on the server. That being said, you probably have a better chance of getting ripped off by a sales clerk copying your credit card number at a department store than getting your information stolen over the internet. You can tell a secure site by the first part of

PDF to imGAE code

Image
[R-sig-mediawiki] Revised Rext 0.03 with better error reporting Alex Brown alex at transitive.com Tue Sep 26 15:03:44 CEST 2006 * Previous message: [R-sig-mediawiki] Revised Rext 0.02 with better error reporting * Next message: [R-sig-mediawiki] R-News article * Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] Attached is a version of Rext 0.03 with my previous changes plus a set of changes to improve error reporting, including: if iframe images cannot render, you get the program text + the error if inline R (default output) contains an error, you get the error message in red inlined with the wiki page if inline R (output=display) fails to render, you get the program text + the error inlined with the wiki page In the long run, I plan to unify the 3 different output modes, starting with default and display - I have a prototype (not included) that does this. I have attached a patch as well as the complete file. -Alex

Create handle for new PDF document

// create handle for new PDF document $pdf = pdf_new(); // open a file pdf_open_file($pdf, "philosophy.pdf"); // start a new page (A4) pdf_begin_page($pdf, 595, 842); // get and use a font object $arial = pdf_findfont($pdf, "Arial", "host", 1); pdf_setfont($pdf, $arial, 10); // print text pdf_show_xy($pdf, "There are more things in heaven and earth, Horatio,", 50, 750); pdf_show_xy($pdf, "than are dreamt of in your philosophy", 50, 730); // end page pdf_end_page($pdf); // close and save file pdf_close($pdf);

Only number restrictions

Image
<br /><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <br /><html xmlns="http://www.w3.org/1999/xhtml"> <br /><head> <br /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <br /><title></title> <br /><link rel="stylesheet" href="style.css" type="text/css" /> <br /></head> <br /><body > <br /><table width="1000" border="0" cellspacing="0" cellpadding="0" align="center"> <br /> <br /> <tr> <br /> <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> <br /> <tr> <br /> <br /> <td><table width="100%" bord

Number,parseint JS

<br /><script type="text/javascript"> <br />function delta() <br />{ <br />var k = confirm("Are you sure to delete the user?"); <br /> <br /> if(k == true) <br /> { <br /> return true; <br /> } <br /> else <br /> { <br /> return false; <br /> } <br />} <br />function delta2() <br />{ <br />var k = confirm("Are you sure to release comission?"); <br /> <br /> if(k == true) <br /> { <br /> return true; <br /> } <br /> else <br /> { <br /> return false; <br /> } <br />} <br /> <br /> <br />function validatesubmit() <br />{ <br /> <br /> <br />var ptitle=document.frm.ptitle.value; <br />if(ptitle=="" ) <br />{ <br />alert("The Product Title field is blank.");document.frm.ptitle.focus();return false; <b

Upload initial setup

ini_set("upload_max_filesize","10M"); ini_set("post_max_size","10M"); ini_set("max_execution_time","10M"); ini_set("max_input_time","10M");

Image upload

$video_file1=$_FILES["fileupload3"]["name"]; $c1 = rand(0,9);$c2 = rand(0,9);$c3 = rand(0,9);$c4 = rand(0,9); $rand = $c1.$c2.$c3.$c4; $date = date("Y-m-d"); if($video_file1!='') { move_uploaded_file($_FILES['fileupload3']['tmp_name'],'../product_images/'.$rand.$_FILES['fileupload3']['name']); } if($video_file1!='') { $path3 = 'product_images/'.$rand.$_FILES['fileupload3']['name']; } else { $path3=$image; }

Java script CDATA

// function validate(f) { var regex = /\W+/; var str = ""; if (f.title.value == "") { str += "\nThe title field is blank."; } if (f.pathnew.value == "") { str += "\nThe file path is blank."; } if (str == "") { f.submit(); } else { alert(str); return false; } } //]]>

Carat purity

The carat (abbreviation ct or kt) is a measure of the purity of gold alloys. In the United States and Canada, the spelling karat is used, while the spelling carat is used to refer to the measure of mass for gemstones (see Carat (mass)). Measure As a measure of purity, one carat is \tfrac{1}{24} purity by mass: X = 24\,\frac{M_g}{M_m} where X is the carat rating of the material, Mg is the mass of pure gold or platinum in the material, and Mm is the total mass of the material. Therefore 24-carat gold is fine (99.9% Au w/w), 18-carat gold is 75% gold, 12-carat gold is 50% gold, and so forth. 24 carat "Chuk Kam" (99.0% min) 22 carat (91.6%) 21 carat (87.5%), 18 carat (75.0%) in most Egypt 18 carat (75.0%) 8-18 carat (33.3 - 75.0%)

USSR stands for Union Of Soviet Socialist Republics.

Directorate of Marketing and Inspection has a set up for quality certification of agricultural produce through the net work of 22 Regional Agmark Laboratories at different places in the country with Central Agmark Laboratory, Nagpur as the apex laboratory. 250 technical persons are working in these laboratories. These laboratories have been established to formulate standards and conduct physical and chemical analysis of agricultural and allied commodities in accordance with APGM Act 1937. Central Agmark Laboratory has the following specialized commodity divisions for carrying out research and standardization work more efficiently. 1. Agricultural Products (Foodgrains) 2. Spices and Essential Oils 3. Oils and Fats 4. General Chemistry 5. Livestock Products including microbiology 6. Toxicology The main functions of Central Agmark Laboratory are: To work as apex laboratory for challenged sample under APG

POPULAR POSTS ::

Add multiple upload box

String Separation

Only number restrictions

Addslashes

Add and Separate more records by comma operator

The top Web development PHP frameworks

HTML Document structure and it's Syntax format