Go4Expert

Go4Expert (http://www.go4expert.com/)
-   JavaScript and AJAX (http://www.go4expert.com/forums/javascript/)
-   -   hide html code on my website (http://www.go4expert.com/forums/hide-html-code-website-t4145/)

daabomb2002 5May2007 10:51

hide html code on my website
 
Hi,

I have a website www.linkdumptube.com and when i browse to it using IE and click on View source,it shows all my html code. Is there anyway to hide this?

Thanks

Darkness1337 9May2007 01:35

Re: hide html code on my website
 
I'm not really sure how to do that m8! but I know how to stop people right click on your page!

if you wanna people stop people right click and steal your stuff just copy and paste this code! :)

Code:

<script type="text/javascript">

function ehan( evnt )
{
  if( evnt.which == 3 )
  {
    alert( "No Right Click" );
    return false;
  }
  return true;
}
function ocmh()
{
  alert( "No Right Click" );
  return false;
}
document.oncontextmenu = ocmh;
document.captureEvents( Event.MOUSEDOWN );
if( document.layers ) document.onmousedown = ehan;

</script>

I'll Try To Find It For Ya! :)

shabbir 9May2007 08:47

Re: hide html code on my website
 
One of the most irritating thing I see when any site has blocked right click for couple of reasons.
1. It does not allow me to open anything in new Window / Tab with my right click and I need to use the middle button.
2. It does not hide the source and its always viewable through the view menu.

Again disabling the JS is also an option

Darkness1337 9May2007 16:25

Re: hide html code on my website
 
lol I know it's annoying but it'll protect your Images(if you dont want anyone to steal them) ... and yeah there is always a way to get around them....... lol

I spent hours trying to find this thing but failed, well I'll find how to do it 2moz when I go to college!, n i'll tell ya how to do it (If I can find it)! :) lol

Darkness1337 11May2007 22:24

Re: hide html code on my website
 
ah am sorry to say this, but I didn't manage to get the code for u. My tutor said there is a way to do it but she didn't know what the code is......... :(

DaWei 12May2007 18:13

Re: hide html code on my website
 
You cannot hide your HTML other than by not giving it to the browser in the first place. You can 'hide' your javascript by having it in an external file. However, you cannot prevent the user from getting at that file. If it's accessible to the browser, it's accessible.

I don't know why anyone would want to annoy the user by disabling right-click. You can't prevent the user from getting anything that appears on the page. If the browser can get it, the user can get it. That's the nature of the beast.

Darkness1337 14May2007 01:04

Re: hide html code on my website
 
I agree wiv ya, there is no point hiding it but there IS a way to do it and I wanna know how to do it lol cuz its just in my head na.....

and yeah disbling the right click may annoy the user but.. but... but .... hmmmm lol


All times are GMT +5.5. The time now is 21:30.