+10  A: 

No, there isn't. There is always a way for users to view the source of your web page, because you already sent it to them. Even if they can't right click, what about a "View source" menu option? Even if you could disable that too, users could use something like wget which isn't a browser to retrieve your page source.

Greg Hewgill
I like how even though you voted to close this question, you still answered it and racked up points. I see your game! =)
George
@George: Call it lazy. I let somebody else find the duplicates this time. :)
Greg Hewgill
+2  A: 

No. If you put it on the web there is no way to hide your source code. You could obfuscate your js, but that's about your only option.

cam
+2  A: 

No, the source (HTML) needs to be present in order for the browser to render.

Dustin Laine
+3  A: 

No, anything processed client-side is visible client-side in one way or another.

You can disable the right-click through javascript but usually that's ineffective and annoying.

Any code you want hidden needs to be server-side.

McAden
A: 

You can disable viewing source code by posting nothing but an empty page. Well, theoretically the user will still be able to select “view source” but there won't be anything to view.

This requirement is mutually exclusive with disabling right click, however; if you add the JavaScript to disable right clicking then the user can gain access to the source code for the click-disabler! As it won't be effective on all browsers anyhow, I suggest just posting the empty page to keep your sources completely safe.

Arkku
Dumb question... How do you post an empty page and still make it function? is this a joke?
Erik
Any browser should be able to render the empty page correctly, i.e. produce the empty window, completely functional, although the background colour of the empty window will vary according to browser preferences. It's practically always white in modern graphical browsers, however. (Trying to change the background colour would again expose the source code you use for specifying the background colour.)
Arkku
On a philosophical note I think it could be argued that the empty source of the empty page is still the source code, which would therefore expose the fact that your page has an empty source. You could circumvent this e.g. by forbidding access to the empty page on the server, but the returned sever error might be considered limiting with regard to functionality + the user could possibly gain access to the source for the server's error page (if any).
Arkku