Thursday, December 27, 2012
Thursday, December 20, 2012
Sunday, November 18, 2012
Tuesday, October 30, 2012
Javascript trim function
Function trim (myString) { return myString.replace(/^s+/g,'').replace(/s+$/g,'') }
Monday, October 29, 2012
Textbox accept digits
script language="javascript" type="text/javascript">
function CheckNumeric(e) {
if (window.event) // IE
{
if ((e.keyCode < 48 || e.keyCode > 57) & e.keyCode != 8) {
event.returnValue = false;
return false;
}
}
else { // Fire Fox
if ((e.which < 48 || e.which > 57) & e.which != 8) {
e.preventDefault();
return false;
}
}
}
</script>
<input type="text" onKeyPress="CheckNumeric(event)" />
function CheckNumeric(e) {
if (window.event) // IE
{
if ((e.keyCode < 48 || e.keyCode > 57) & e.keyCode != 8) {
event.returnValue = false;
return false;
}
}
else { // Fire Fox
if ((e.which < 48 || e.which > 57) & e.which != 8) {
e.preventDefault();
return false;
}
}
}
function IsNumeric(sText) { var ValidChars = "0123456789."; //loop through the string passed in, iif its in the validchars list, continue, otherwise, return false for(i = 0; i < sText.length; i++) { if(ValidChars.indexOf(sText.charAt(i)) == -1) { return false; } } return true; }
function validateNumerical(evt) { var theEvent = evt || window.event; var key = theEvent.keyCode || theEvent.which; key = String.fromCharCode( key ); var regex = /[0-9,\.]/; if( !regex.test(key) ) { theEvent.returnValue = false; if(theEvent.preventDefault) { theEvent.preventDefault(); } } }
</script>
<input type="text" onKeyPress="CheckNumeric(event)" />
Friday, October 26, 2012
Thursday, October 25, 2012
Sunday, October 21, 2012
copy row from another table
INSERT INTO Table (foo, bar, Event_ID)
SELECT foo, bar, Event_ID+"155"
FROM Table
WHERE Event_ID = "120"
Friday, October 19, 2012
MySQL Joins
http://www.sitepoint.com/understanding-sql-joins-mysql-database/
Tuesday, October 16, 2012
Print only a part of the page
<div id="printableArea">
<h1>Print me</h1>
</div>
<input type="button" onclick="printDiv('printableArea')" value="print a div!" />
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
==========================================================================
using frames
==========================================================================
<html> <head> <title>Print Test Page</title> <script> printDivCSS = new String ('<link href="myprintstyle.css" rel="stylesheet" type="text/css">') function printDiv(divId) { window.frames["print_frame"].document.body.innerHTML=printDivCSS + document.getElementById(divId).innerHTML; window.frames["print_frame"].window.focus(); window.frames["print_frame"].window.print(); } </script> </head> <body> <h1><b><center>This is a test page for printing</center></b><hr color=#00cc00 width=95%></h1> <b>Div 1:</b> <a href="javascript:printDiv('div1')">Print</a><br> <div id="div1">This is the div1's print output</div> <br><br> <b>Div 2:</b> <a href="javascript:printDiv('div2')">Print</a><br> <div id="div2">This is the div2's print output</div> <br><br> <b>Div 3:</b> <a href="javascript:printDiv('div3')">Print</a><br> <div id="div3">This is the div3's print output</div> <iframe name="print_frame" width="0" height="0" frameborder="0" src="about:blank"></iframe> </body> </html>
Thursday, September 27, 2012
Secure Textbox
Put these attributes in your textboxes to avoid many errors
onpaste="return false" ondrop="return false" ondrag="return false" oncopy="return false" autocomplete="off"
onpaste="return false" ondrop="return false" ondrag="return false" oncopy="return false" autocomplete="off"
Monday, August 27, 2012
Saturday, July 7, 2012
Friday, July 6, 2012
Tuesday, July 3, 2012
Friday, June 8, 2012
Thursday, May 31, 2012
Tuesday, May 8, 2012
Friday, May 4, 2012
Zend Interview questions
http://rathinasamyy.blogspot.in/2011/09/zend-framework-interview-questions.html
Monday, April 23, 2012
Sunday, April 22, 2012
Wednesday, March 14, 2012
Friday, March 9, 2012
WordPress Plugin Development
http://phpmaster.com/wordpress-plugin-development/?utm_medium=email&utm_campaign=PHPMaster+Newsletter+-+28+February+2012&utm_content=PHPMaster+Newsletter+-+28+February+2012+CID_0be710c4bf6a54d76c7e777bd9bd15f0&utm_source=Newsletter&utm_term=More
Thursday, February 16, 2012
Monday, February 13, 2012
Wednesday, February 8, 2012
Wordpress Class Refrence
http://codex.wordpress.org/Class_Reference
Tuesday, February 7, 2012
PHP SITES
http://phpbuilder.com/manual/en/language.oop5.decon.php
http://www.php.net/manual/en/function.serialize.php
security tips
http://net.tutsplus.com/tutorials/php/simple-techniques-to-lock-down-your-website/
http://www.php.net/manual/en/function.serialize.php
security tips
http://net.tutsplus.com/tutorials/php/simple-techniques-to-lock-down-your-website/
Sunday, February 5, 2012
Tuesday, January 31, 2012
Thursday, January 26, 2012
XML with PHP
http://phpmaster.com/bending-xml-to-your-will/
PHP Dom working with xml
http://phpmaster.com/php-dom-working-with-xml/
PHP DOM working with XPath
http://phpmaster.com/php-dom-using-xpath/?utm_medium=email&utm_campaign=Five+Creative+PHP+Snippets+XML+Wizardry+with+XPath+and+Manage+Your+Class+Dependencies&utm_content=Five+Creative+PHP+Snippets+XML+Wizardry+with+XPath+and+Manage+Your+Class+Dependencies+CID_9891ebab597beaca64e251bc7ed155ed&utm_source=Newsletter&utm_term=PHP+DOM+Using+XPath
PHP Dom working with xml
http://phpmaster.com/php-dom-working-with-xml/
PHP DOM working with XPath
http://phpmaster.com/php-dom-using-xpath/?utm_medium=email&utm_campaign=Five+Creative+PHP+Snippets+XML+Wizardry+with+XPath+and+Manage+Your+Class+Dependencies&utm_content=Five+Creative+PHP+Snippets+XML+Wizardry+with+XPath+and+Manage+Your+Class+Dependencies+CID_9891ebab597beaca64e251bc7ed155ed&utm_source=Newsletter&utm_term=PHP+DOM+Using+XPath
Tuesday, January 24, 2012
Wednesday, January 18, 2012
How To Generate JSON With PHP and Parse It With JQuery
http://webhole.net/2010/02/12/generate-json-with-php-and-read-it-with-jquery/
Tuesday, January 10, 2012
Beginner SQL Tutorial
http://beginner-sql-tutorial.com/sql-query-tuning.htm
Friday, January 6, 2012
Subscribe to:
Posts (Atom)