Рубрики:
php. автор: author
Apr.19, 2012
Safe redirect:
<?php
function Redirect($Str_Location, $Bln_Replace = 1, $Int_HRC = NULL)
{
if(!headers_sent())
{
header('location: ' . urldecode($Str_Location), $Bln_Replace, $Int_HRC);
exit;
}
exit('<meta http-equiv="refresh" content="0; url=' . urldecode($Str_Location) . '"/>'); # | exit('<script>document.location.href=' . urldecode($Str_Location) . ';</script>');
return;
}
?>
Рубрики:
php. автор: coja
Apr.11, 2012
To get full path to the script currently being read:
dirname(__FILE__)
To get just the current directory name:
basename(dirname(__FILE__))
Рубрики:
Other. автор: coja
Apr.17, 2012
http://developer.ebay.com/DevZone/finding/HowTo/PHP_SearchInterm_NV_XML/PHP_SearchInterm_NV_XML.html
Prompt usage snippet
var track_number = prompt("Please enter tracking number:");
if(track_number)
{
$(this).data('track_number', track_number);
//$(this).closest('tr').children().eq(4).append('<div style="color:red; display:block;text-align: center;">[' + track_number + ']</div>');
}
else
{
/* do something else */
}
Code snippet to include JQuery UI framework from Google libs
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
</head>
Рубрики:
html. автор: author
Mar.30, 2012
.clearfix:after { content: "."; visibility: hidden; display: block; height: 0; clear: both; }
Usage
<div class='.clearfix'>
Some content
</div>
Bonus:
In css :
.clear { clear: both; }
<br class='clear' />
<input type='text' style='margin:0 10px;background-color:#F3FAAA;width:250px;height:16px;vertical-align: text-bottom;;' name='search_text' id='search_field' value='Ex.: Dell Latitude D620 enter D620 only' onfocus='$(this).val(\"\").css(\"color\", \"#000000\")'
onblur='($(this).val() == \"\") ? $(this).val(\"Ex.: Dell Latitude D620 enter D620 only\").css(\"color\", \"#9B9B9B\") : $(this)' />
Рубрики:
html. автор: author
Mar.20, 2012
Right way to use clear behavior for floated elements
.clear_fix {
clear: both;
content: ".";
display: block;
height: 0;
visibility: hidden;
}
Рубрики:
Other. автор: author
Mar.15, 2012
List of websites with nice design
http://w9y.ru/wordpress/templ/healthwp/