Results 1 to 3 of 3

Thread: javascript?

  1. #1

    Default javascript?


    dili mu show sa IE.. kinsa buotan? tabangi ko pleeeeeez..

    Code:
    var message="Sorry, right-click has been disabled";
    
    ///////////////////////////////////
    
    function clickIE() {if (document.all) {(message);return false;}}
    
    function clickNS(e) {if
    
    (document.layers||(document.getElementById&&!document.all)) {
    
    if (e.which==2||e.which==3) {(message);return false;}}}
    
    if (document.layers)
    
    {document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
    
    else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
    
    document.oncontextmenu=new Function("return false")

  2. #2

    Default Re: javascript?

    try another browser firefox etc..

  3. #3

    Default Re: javascript?

    actually you just need to specify which browser so you can call the specific function.

    Code:
    <html>
    <head>
    <title>test disable right click</title>
    
    <script>
    // BROWSER DETECTION
    var browser=navigator.appName
    var b_version=navigator.appVersion
    var version=parseFloat(b_version)
    
    var message="Sorry, right-click has been disabled";
    
    function clickIE()
    {
    	alert(message);
    	return false;
    }
    
    function clickNS(e) {
    	if (e.which==2||e.which==3)
    	{
    		alert(message);
    		return false;
    	}
    }
    
    if (document.getElementById)
    {
    	if (browser=="Microsoft Internet Explorer")
    	{
    		document.oncontextmenu=clickIE;
    	}
    	else
    	{
    		document.oncontextmenu=clickNS;
    	}
    }
    </script>
    
    </head>
    
    <body>
    ang balay ni bilay libat<br \>
    ang balay ni bilay ****<br \>
    ang labay ni libay libat<br \>
    ang babay ni lilay biyat<br \>
    </body>
    </html>
    works on IE6, IE7 and FF... sorry I have no time to work on a solution for Opera browser... and didn't tried it on Safari either.

    hope this helps...

    enjoy! ^____^

  4.    Advertisement

Similar Threads

 
  1. [ videoke in javascript ]
    By doboloh in forum Networking & Internet
    Replies: 0
    Last Post: 03-14-2008, 01:51 PM
  2. Javascript : How to POST variable using JS
    By emailroy2002 in forum Programming
    Replies: 5
    Last Post: 03-11-2008, 10:38 AM
  3. Replies: 5
    Last Post: 04-22-2007, 11:09 PM
  4. JAVASCRIPT: how to object value from window.open()
    By hybrid_X in forum Programming
    Replies: 0
    Last Post: 04-09-2007, 01:45 PM
  5. wat does javascript:void means?
    By etgo in forum Computer Hardware
    Replies: 3
    Last Post: 09-12-2005, 07:36 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top