array.splice(array.indexOf(value), 1);
Tuesday, 6 September 2011
Monday, 13 June 2011
Run PHTML file as HTML in Dreamweaver
Go to the folder where the dreamweaver is installed...... (Try to install some other drive where the windows is not installed... due to admin permission problem)
Open Adobe dreamweaver CS3 (or whatever you installed).... and paste crack file (dreamweaver) here (overwrite the older one).
Go to configuration folder....
Then DocumentTypes...... Open MMDocumentTypes file .......... find php5 (it would be on two places).....
Just write ,phtml after php5 in both of the places........
Now you can check.... it will work fine.... :)
Open Adobe dreamweaver CS3 (or whatever you installed).... and paste crack file (dreamweaver) here (overwrite the older one).
Go to configuration folder....
Then DocumentTypes...... Open MMDocumentTypes file .......... find php5 (it would be on two places).....
Just write ,phtml after php5 in both of the places........
Now you can check.... it will work fine.... :)
Wednesday, 1 June 2011
Check all checkboxes through JQuery on a Checkbox event
//chkAllSub function calls on sub checkboxes click
//chkAll function calls on main checkbox
//.sub_chk is the class of sub checkboxes
//master is the ID of main checkbox
function chkAllSub()
{
$(".sub_chk").each(function(){
var chkboxLength = $("input.sub_chk").length;
if($("input.sub_chk:checked").length >= chkboxLength)
{
$("#master").attr('checked',true);
}
else
{
$("#master").attr('checked',false);
}
})
}
function chkAll()
{
if($("#master").is(':checked',true))
{
$(".sub_chk").attr('checked',true);
}
else
{
$(".sub_chk").attr('checked',false);
}
}
//chkAll function calls on main checkbox
//.sub_chk is the class of sub checkboxes
//master is the ID of main checkbox
function chkAllSub()
{
$(".sub_chk").each(function(){
var chkboxLength = $("input.sub_chk").length;
if($("input.sub_chk:checked").length >= chkboxLength)
{
$("#master").attr('checked',true);
}
else
{
$("#master").attr('checked',false);
}
})
}
function chkAll()
{
if($("#master").is(':checked',true))
{
$(".sub_chk").attr('checked',true);
}
else
{
$(".sub_chk").attr('checked',false);
}
}
Monday, 9 May 2011
Check all checkboxes through JQuery
$(document).ready(function(){
$(".checkall").click( function() {
$("input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
})
})
$(".checkall").click( function() {
$("input[type='checkbox']:not([disabled='disabled'])").attr('checked', true);
})
})
Find any part of string in another string & manipulate accordingly
<?php
$string = 'www.google.com';//string
$ss = strpos($string,'http://');//cheking whether the part of string exist in full string or not
if($ss!==false)//if exists
{
$string = $string;
}
else
{
$string = 'http://'.$string;
}
echo $string;//final string.
?>
$string = 'www.google.com';//string
$ss = strpos($string,'http://');//cheking whether the part of string exist in full string or not
if($ss!==false)//if exists
{
$string = $string;
}
else
{
$string = 'http://'.$string;
}
echo $string;//final string.
?>
Friday, 6 May 2011
Regular Expression in MySQL
WHERE phone REGEXP '[(]435[)]';
would return only phone numbers with (435), such as "1(435)555-5555".
would return only phone numbers with (435), such as "1(435)555-5555".
Subscribe to:
Posts (Atom)