Posts

javascript Div pop up

<style type="text/css">     #popup      {         background-color:#111;         opacity: 0.65;         filter:alpha(opacity=65);         position:absolute;         z-index: 6001;         top:0px;         left:0px;         width:100%;      }     #popUpDiv      {         position:absolute;         background-color:#eeeeee;         width:300px;         height:300px;         z-index: 6002;     }    </style> <script type="text/javascript">     function toggle(div_id)       {           var el = document.getElementById(div_id);           if ( el.style.display == 'none' ) { el.style.display = 'block';}           else {el.style.display = 'none';}       }     function popup_size(popUpDivVar)        {           if (typeof window.innerWidth != 'undefined')            {              viewportheight = window.innerHeight;            }           else            {              viewportheight = doc

how to limit the number of characters in textarea

<script language="javascript" type="text/javascript"> function limitText(limitField, limitCount, limitNum) {     if (limitField.value.length > limitNum) {         limitField.value = limitField.value.substring(0, limitNum);         alert("your message exceeds the limit");     } else {         limitCount.value = limitNum - limitField.value.length;     } } </script> <form name="myform" action=""> <textarea id="t1" name="description" onpropertychange="limitText(this.form.description,this.form.countdown,10);"  OnInput="limitText(this.form.description,this.form.countdown,10);" onKeyDown="limitText(this.form.description,this.form.countdown,10);" rows="20" cols="40"> </textarea><br> <font size="1">(Maximum characters: 10)<br> You have <input readonly type="text" name="countdown&quo

code similar to cflocation which gives a pop up message

<html> <head> <script type="text/javascript"> var t = 1000; function display() { var msg = confirm("activity is successful without attachment"); if (msg) location.href="http://shemy-coldfusion.blogspot.in"; else location.href="http://www.google.com"; } </script> </head> <body onLoad="javascript:setTimeout('display()', t);"> </body> </html>

Progress Bar in coldfusion

<html>     <head>         <script>             function init()                 {                      ColdFusion.ProgressBar.start("pb")                }         </script>     </head>     <body>         <h2>Processing....</h2>         <cfprogressbar name="pb" duration="5000" interval="20" width="300" />         <cfset ajaxOnLoad("init")>     </body> </html>

Code to find the number of functions in the current coldfusion version

<cfset fList = GetFunctionList () > <cfoutput> # StructCount ( fList ) # functions </cfoutput>< br > <cfloop collection = "#fList#" item = "key" >       <cfoutput> #key# < br ></cfoutput> </cfloop>