| Author: Shruthi 03 Dec 2008 | Member Level: Silver | Rating:  Points: 0 |
u can use range validations also set minvalue=6
|
| Author: Deepika Haridas 03 Dec 2008 | Member Level: Diamond | Rating:  Points: 3 |
Hi,
You can check for the condition if(txtpswd.text.length() > 6) { messagebox.show("Password should be only 6 chars"); }
Regards, deepika
Thanks & Regards, Deepika Editor
If U want to shine like a SUN..First U have to burn like the SUN!! Need a Guide? Join my mentor program..
|
| Author: satheesh 03 Dec 2008 | Member Level: Silver | Rating:  Points: 6 |
Hi,
<asp:TextBox ID="TextBox1" onmouseover="ddrivetip(' maximum 10 char allowed add/edit menu items',230)" onmouseout="hideddrivetip()" runat="server" Style="z-index: 101; left: 131px; position: absolute; top: 200px;" ></asp:TextBox>
copy and past the following code inside the head tag in the sourceview of the page
<style type="text/css">
#dhtmltooltip{ position: absolute; left: -300px; width: 150px; border: 1px red; padding: 2px; background-color: #5c1006; visibility: hidden; z-index: 500; /*Remove below line to remove shadow. Below line should always appear last within this CSS*/ filter: progid:DXImageTransform.Microsoft.Shadow(color=black,direction=130); }
#dhtmlpointer{ position:absolute; left: -300px; z-index: 501; visibility: hidden; }
</style>
<script type="text/javascript">
var offsetfromcursorX=12 var offsetfromcursorY=10
var offsetdivfrompointerX=10 var offsetdivfrompointerY=14
document.write('<div id="dhtmltooltip"></div>') document.write('<img id="dhtmlpointer" src="arrow2.gif">')
var ie=document.all var ns6=document.getElementById && !document.all var enabletip=false if (ie||ns6) var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""
function ietruebody(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body }
function ddrivetip(thetext, thewidth, thecolor){ if (ns6||ie){ if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px" if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor tipobj.innerHTML=thetext enabletip=true return false } }
function positiontip(e){ if (enabletip){ var nondefaultpos=false var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop; //Find out how close the mouse is to the corner of the window var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20 var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000
//if the horizontal distance isn't enough to accomodate the width of the context menu if (rightedge<tipobj.offsetWidth){ //move the horizontal position of the menu to the left by it's width tipobj.style.left=curX-tipobj.offsetWidth+"px" nondefaultpos=true } else if (curX<leftedge) tipobj.style.left="5px" else{ //position the horizontal position of the menu where the mouse is positioned tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px" pointerobj.style.left=curX+offsetfromcursorX+"px" }
//same concept with the vertical position if (bottomedge<tipobj.offsetHeight){ tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px" nondefaultpos=true } else{ tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px" pointerobj.style.top=curY+offsetfromcursorY+"px" } tipobj.style.visibility="visible" if (!nondefaultpos) pointerobj.style.visibility="visible" else pointerobj.style.visibility="hidden" } }
function hideddrivetip(){ if (ns6||ie){ enabletip=false tipobj.style.visibility="hidden" pointerobj.style.visibility="hidden" tipobj.style.left="-1000px" tipobj.style.backgroundColor='' tipobj.style.width='' } } document.onmousemove=positiontip </script>
it wil be work fine for u... check out this
|
| Author: Syed Shakeer Hussain 03 Dec 2008 | Member Level: Diamond | Rating:  Points: 4 |
Hi..
i am sending code about how to popup message when you moueseover a textbox
1.first Add a ToolTip Control .it will dispaly below window code. 2.select your tool tip and in properties set 1.IsBallon =true showalways =true and TollTipIcon=true
Next Select your PasswordTextbox. In Properties TollTip on ToolTip1 write a text as 'Password should be 5 charecters"
Thanks & Regards! Syed Shakeer Hussain
|