Friday, September 28, 2007
Move Div Vertical ScrollBar Simultaneously
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" >
<title>Move Div Vertical ScrollBar Simultaneously</title>
<script language="javascript">
function divScrollR()
{
var Right = document.getElementById('Av');
var Left = document.getElementById('Bv');
Left.scrollTop = Right.scrollTop;
}
function divScrollL()
{
var Right = document.getElementById('Av');
var Left = document.getElementById('Bv');
Right.scrollTop = Left.scrollTop;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div id="Av" style="z-index: 102; width: 100px; height: 100px; overflow: auto;
overflow-x: hidden; overflow-y: scroll; left: 10px; position: absolute; top: 16px;" onscroll="divScrollR();">
<pre>
</pre>
</div>
<div id="Bv" style="z-index: 101; top: 16px; width: 100px; height: 100px; overflow: auto;
overflow-x: hidden; overflow-y: scroll; left: 113px; position: absolute;" onscroll="divScrollL();">
<pre>
</pre>
</div>
</div>
</form>
</body>
</html>
Program Demo
Block F5(Refresh) Key In IE and Firefox
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Block F5 Key In IE & Mozilla</title>
<script language="JavaScript">
var version = navigator.appVersion;
function showKeyCode(e)
{
var keycode =(window.event) ? event.keyCode : e.keyCode;
if ((version.indexOf('MSIE') != -1))
{
if(keycode == 116)
{
event.keyCode = 0;
event.returnValue = false;
return false;
}
}
else
{
if(keycode == 116)
{
return false;
}
}
}
</script>
</head>
<body onload="JavaScript:document.body.focus();" onkeydown="return showKeyCode(event)">
</body>
</html>
Program Demo
Note: Tested In IE 7 & Mozilla Firefox 2.0.0.6
Sunday, September 23, 2007
copy to clipboard
<head>
</head>
<body>
<textarea id='clipText'>Enter Text And Click Button To Copy Text To ClipBoard</textarea><br />
<input type=button id='bt' onclick="clipboardData.setData('Text',document.getElementById('clipText').value);" value="Copy" />
<input type=button onclick="clipboardData.clearData('Text');" value="Clear" />
<input type=button onclick="alert(clipboardData.getData('Text'));" value="Paste" />
</body>
Program Demo
Thursday, September 20, 2007
Restrict Alphabet Input In TextBox Using Regular Expression
<head>
<script language="javascript">
function blockChar()
{
var str = document.getElementById('txt').value;
str = str.replace(/[^\d]*/g,'');
document.getElementById('txt').value = str;
}
</script>
</head>
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeyup="blockChar();" />
</body>
</html>
Program Demo
Note:IE Supported
Tuesday, September 18, 2007
Restrict Alphabet Input In TextBox
<head>
<script language="javascript">
function blockChar(e)
{
var keyVal =(window.event) ? event.keyCode : e.keyCode;
if (window.event) keyVal = window.event.keyCode;
if((keyVal > 64 && keyVal < 93))
{
return false;
}
}
</script>
</head>
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeydown="return blockChar(this);" />
</body>
</html>
Program Demo
Monday, September 17, 2007
Restrict Numberic Input In TextBox
<head>
<script language="javascript">
function blockNum(e)
{
var keyVal =(window.event) ? event.keyCode : e.keyCode;
if (window.event) keyVal = window.event.keyCode;
if((keyVal > 47 && keyVal < 58) || (keyVal > 95 && keyVal < 107))
{
return false;
}
}
</script>
</head>
<body onload="javascript:document.getElementById('txt').focus();">
<input type="text" id='txt' onkeydown="return blockNum(this);" />
</body>
</html>
Program Demo
Saturday, September 15, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) VII
Navigation
Edit.FindAllReferences SHIFT+F12 or CTRL+K, R
Edit.GoToBrace CTRL+CTRL + ]
Edit.GoToDefi nition F12
Edit.GoToNextLocation F8
Edit.IncrementalSearch CTRL+I
View.ClassViewGo-ToSearch, Combo CTRL+K,CTRL+V
View.Forward-BrowseContext CTRL+SHIFT+7
View.PopBrowse-Context CTRL+SHIFT+8
View.Navigate-Backward CTRL+MINUS+SIGN (-)
View.Navigate-Forward CTRL+SHIFT+MINUS SIGN (-)
Edit.FindInFiles CTRL +SHIFT + F
Edit.FindSymbol ALT+F12
View.ViewCode F7
View.ViewDesigner SHIFT+F7
Note: Switches to Design to Source (Available only in Source view.)
View.ViewMarkup SHIFT+F7
Note:Switches to Source to Design (Available only in Design view.)
Window.MoveTo-NavigationBar CTRL+F2
Edit.Find CTRL+F
Edit.GoTo CTRL+G
Edit.GoToFindCombo CTRL+/
Friday, September 14, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) VI
Debugging
Debug.Autos CTRL+D, A
Debug.CallStack CTRL+D, C
Debug.Immediate CTRL+D, I
Debug.Locals CTRL+D, L
Debug.QuickWatch CTRL+D, Q
Debug.Start CTRL+F5
Debug.StartWithoutDebugging CTRL+F5
Debug.StepInto F11
Debug.StepOut SHIFT+F11
Debug.StepOver F10
Debug.Stop-Debugging SHIFT+F5
Debug.Toggle-Breakpoint F9
Debug.Watch CTRL+D, W
Debug.Enable-Breakpoint CTRL+F9
Make Datatip Transparent [CTRL]
Thursday, September 13, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part V
Window
View.ClassView CTRL+W, C
View.CodeDefi nition-Window CTRL+W, D
View.Command-Window CTRL+W, A
View.ErrorList CTRL+W, E
View.ObjectBrowser CTRL+W, J
View.Output CTRL+W, O
View.PropertiesWindow CTRL+W, P
View.SolutionExplorer CTRL+W, S
View.TaskList CTRL+W, T
View.Toolbox CTRL+W, X
View.ServerExplorer CTRL+W, L
Window.Close-ToolWindow SHIFT +ESC
Data.ShowDataSources SHIFT+ALT+D
Window.Close-Document,
Window CTRL+F4Window.Next-Document,
Window Nav CTRL+TAB
return values from popup to the parent page(Child To Parent)
Parent.html
~~~~~~~~~
<html>
<head>
<script language="javascript">
function test()
{
var FrmChild = window.showModalDialog('child.html',null,'status:off;center:yes;scroll:no;');
if(FrmChild != null)
{
document.getElementById('Ptxt').value = FrmChild;
}
else
{
return false;
}
}
</script>
<head>
<body>
<input type="text" id='Ptxt'/> <input type="button" onclick="test();" value="Call Child Window" />
</body>
</html>
Child.html
~~~~~~~
<html>
<head>
<script language="javascript">
function Child()
{
var Str = document.getElementById('ctxt').value; window.returnValue = Str;
window.close();
}
</script>
<head>
<body>
Enter Any Value To Pass To The Parent Window<br />
<input type="text" id='ctxt' />
<input type="button" onclick="Child();" value=" Child Click" /> </body>
</html>
Program Demo
Note : IE Supported
Wednesday, September 12, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part IV
Refactoring
Refactor.-EncapsulateField CTRL+R, E
Refactor.Extract-Interface CTRL+R, I
Refactor.ExtractMethod CTRL+R, M
Refactor.Promote-LocalVariableto-Parameter CTRL+R, P
Refactor.Remove-Parameters CTRL+R, V
Refactor.Rename CTRL+R, R OR F2
Refactor.Reorder-Parameters CTRL+R, O
Tuesday, September 11, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part III
IntelliSense
Edit.CompleteWord CTRL+SPACEORCTRL+ K, W
Edit.ListMembers CTRL+JORCTRL+K, L
Edit.QuickInfo CTRL+K, I
Edit.ParameterInfo CTRL+SHIFT+SPACEORCTRL+K, P
Build
Build.BuildSolution F6 OR CTRL+SHIFT+B
Build.BuildSelection SHIFT+F6
Monday, September 10, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part II
Editing
Edit.CollapseTo-Definitions CTRL+M, O
Edit.ToggleAllOutlining CTRL+M, L
Edit.Toggle-OutliningExpansion CTRL+M, M
Edit.StopOutlining CTRL+M, P
Edit.CommentSelection CTRL+K, C
Edit.Uncomment-Selection CTRL+K, U
Edit.FormatDocument CTRL+K, D
Edit.FormatSelection CTRL+K, F
Edit.InsertSnippet CTRL+K, X
Edit.SurroundWith CTRL+K, S
Edit. Invoke Snippet From Shortcut TAB
Edit.CycleClipboardRing CTRL+SHIFT+V
Edit.Replace CTRL+H
Edit.ReplaceInFiles CTRL+SHIFT+H
View.ShowSmartTag CTRL+. or SHIFT +ALT+F10
Sunday, September 9, 2007
Visual Studio 2005 Keyboard Shortcuts(KeyBinding) Part I
File
File.NewProject CTRL+SHIFT+N
File.OpenProject CTRL+ SHIFT+O
File.OpenFile CTRL+O
Project.AddClass SHIFT+ALT+C
Project.AddExisting-Item SHIFT+ALT+A
Project.AddNewItem CTRL+SHIFT+A
Friday, September 7, 2007
Sleep Function Using JavaScript
<head>
<script language='javascript'>
function sleep()
{
var Sleep = setTimeout("alert('Hi Have A Nice Time And Day ')",2000);
// 2000 Millisecond(2 sec)
}
</script>
<body onload='sleep()'>
Alert Box Will Be Displayed After 2 Seconds the Body is Loaded
</body>
</html>
Note: Tested In IE 7
Program Demo
Wednesday, September 5, 2007
Move More Than one Div Scroll Bar At a time
Saturday, September 1, 2007
Download Visual Studio 2008 Beta 2
Welcome To Visual Studio Arena
Visual Studio 2005 Downloads
Visual Studio 2005Service Pack 1 (SP1)
.Net Framework
Feature Specifications for Visual Studio 2008 and .NET Framework 3.5
Microsoft Pre-Release Software Microsoft .NET Framework 3.5 – Beta 1
Microsoft .NET Framework 3.5 Beta 2
Visual Studio 2008 Downloads
Visual Studio 2008 Beta 2 Express Editions
Visual Studio 2008 Beta 2 Standard Edition
Visual Studio 2008 Beta 2 Professional Edition
Visual Studio Team System 2008 Beta 2 Team Suite
Visual Studio Team System 2008 Beta 2 Team Foundation Server
Visual Studio Team System 2008 Beta 2 Test Load Agent
MSDN
MSDN Library for Visual Studio 2008 Beta 2
Expression Studio
Microsoft Expression Studio Free Trial