Posts

Showing posts from September, 2011

HTML - Image Lightbox

Image
If you need to show the full size overlay image on the current page. "Lokesh Dhakar"'s coding is a good example. His code is on javascript and stylesheet. Please visit Lokesh's site to download & see the example. URL Reference: http://www.huddletogether.com/projects/lightbox2/ Example: if you click on thumbnail image. You'll get the full image like this.

MSSQL - Reset Identity Column Value in SQL Server

Command to reset identity column: DBCC CHECKIDENT(table_name,RESEED,0) 1 is the next value of your identity column. Example. Column "id" in table "customer" is an identity column. DBCC CHECKIDENT("customer",RESEED,0) -> next id is 1. or DBCC CHECKIDENT("customer",RESEED,10) -> next id is 11. If you need to check next ID you can use DBCC CHECKIDENT("customer",NORESEED) -> you'll get these result. "Checking identity information: current identity value '0', current column value '0'. DBCC execution completed. If DBCC printed error messages, contact your system administrator." Or you can use this SQL statement to get the current identity: Example. SELECT IDENT_CURRENT ('customer') AS Current_Identity

javascript - show/hide div section

< script language = "javascript" > function toggle ( ) { var ele = document. getElementById ( "toggleText" ) ; var text = document. getElementById ( "displayText" ) ; if ( ele. style . display == "block" ) { ele. style . display = "none" ; text. innerHTML = "show" ; } else { ele. style . display = "block" ; text. innerHTML = "hide" ; } } </ script >   <a id="displayText" href="javascript:toggle();">show</a> <== click Here <div id="toggleText" style="display: none"><h1>peek-a-boo</h1></div> web reference: www.randomsnippets.com