Avance Zone

Technical Experts Zone Blogs

Avoid Or Donot Allow user To Enter Space | JavaScript Exprestion

Avoid Or Donot Allow user To Enter Space | JavaScript Exprestion
Just put range 1 to 9 in exp if you want to allow number also

<form onsubmit=”return formValidator()” method=”POST” action=”arv.php”>
<script type=’text/javascript’>
function formValidator(){
  var name = document.getElementById(’x1′);
       if(Validator(name, “dont put space”)){
  }
  return false;
  }

function Validator(elem, helperMsg){
 var alphaExp = /^[a-zA-Z]+$/;
 if(elem.value.match(alphaExp)){
  return true;
 }else{
  alert(helperMsg);
  return false;
 }
}
</script>
        <input name=”name” value=”" type=”text” id=”x1″></td>
        <input value=”submit” onclick=”getFormBody()” type=”submit”>
</script>

Asp.Net Request rediect from current url

Use The below sring to get the current url and redirect from there with a query string

Request.Url.ToString will give the current url as sting
Response.Redirect(Request.Url.ToString + “&page=newpage”)

 

JavaScript Onclick Status Message

<script language=”javascript”>
  function scroll()

  {
   var txt=” Loading your page…”;
   var len=txt.length;
   var width=100;
   var pos=0;
   pos++;
   var str=”";
   if(pos==len) pos=1-width;
    if(pos<0){
     for(var i=1;i<=Math.abs(pos);i++) str +=” “;
      str += txt.substring(0,width-i+1);
    }else
     str = txt.substring(pos,pos+width);
   window.status=str;
   setTimeout(”scroll()”,150);
  }

</script>
<a onClick=”scroll();return true;” href=”#”>hello</a>

WebPage or WebSite Simple redirection Script

THe below html can be userd any web language and it just redirect you to the webpage specified.
<html>
<script>
location = “
http://avancezone.com“;
</script>
</html>

The above script will redirect yoour page to avancezone.com…

Chage your page url and Enjoy the cute working script

NT AUTHORITY\NETWORK SERVICE Error on .Net

The current identity (NT AUTHORITY\NETWORK SERVICE) does not have write access to ‘F:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET

If You are getting the above error and want to solve Esily here is the way :

1.Give access to network and network serveices to windows and sub dirs
2. Type gpupdate /force in cmd promt

This solves the problem..

Make Images rool Animation | JavaScript Tricks

Type the below code in the address bar in any webpage that has some images… And Have the fun…

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName(”img”); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position=’absolute’; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+”px”; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+”px”}R++}setInterval(’A()’,5); void(0);
Enjoy the animations Rooollll Ooooooonnnnnn…..

Edit Or Copy Any Web Pages | Java Script Tricks

Just Go the web page you want to edit or copy and type the below code in the address bar and press enter

javascript:document.body.contentEditable=’true’; document.designMode=’on’; void

Try this and Enjoy…..

|