Feeds:
Posts
Comments

Archive for the ‘Javascript’ Category

I needed to access every cell of a GridView in Client Side in one of my application, so needed to call javascript from GridView Cell. Actually I have a Dropdownlist , select any of the item from the dropdownlist will change the value of the same row in a different cell and will change the [...]

Read Full Post »

fun with Javascript

I faced a problem to call 2 methods at the same time from body. and the solution is very simple. I wrote a script block at the end of the page look like that.
<SCRIPT LANGUAGE=”JAVASCRIPT”>
if(document.body.onload)
{
var existingOnLoad = document.body.onload;
document.body.onload = function()
{
existingOnLoad();
MyOwnMethod();
}
}
</SCRIPT>

Read Full Post »

no right click allowed

here is the script not ot allow right click in browser
<script language=”Javascript1.2″>
am = “NO RIGHT CLICK ALLOWED!”;
bV  = parseInt(navigator.appVersion)
bNS = navigator.appName==”Netscape”
bIE = navigator.appName==”Microsoft Internet Explorer”
function nrc(e) {
   if (bNS && e.which > 1){
      alert(am)
      return false
   } else if (bIE && (event.button >1)) {
  alert(am)
     return false;
   }
}
document.onmousedown = nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (bNS && bV<5) [...]

Read Full Post »