Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

how do i stop people looking at view source

how do i stop people looking at view source.
can someone pleas tell me

Comments

  • iDaZeiDaZe Posts: 464Member
    : how do i stop people looking at view source.
    : can someone pleas tell me
    :

    You could disable right-click and open the page in a popup without menu buttons ... offcourse, people can always look at the source of the page that called the popup, open it in a sepperate explorer and use the menu to look at the source, so there is no perfectly safe way to prevent it
  • FirestormFirestorm Posts: 162Member
    There is one thing more you can do then idaze said:
    I didn't test it but that must be possible:

    1. in the start window write a script for "onload" which disables adressbar, menu, and writes something useless in the status bar.

    2. now before opening any other htm-file in the same browser-window or in any new, write that what I said above as a property for the new file or window before opening.

    I hope that works as I imagine it and helps you!
    Firestorm
    blue_surfer2000@yahoo.de
    ;-)

  • DevelopmentDevelopment Posts: 222Member



    Try that! I have allso give you a new look button :)


    your dev
  • nowayridenowayride Posts: 1Member
    : : how do i stop people looking at view source.
    : : can someone pleas tell me
    : :
    :
    : You could disable right-click and open the page in a popup without menu buttons ... offcourse, people can always look at the source of the page that called the popup, open it in a sepperate explorer and use the menu to look at the source, so there is no perfectly safe way to prevent it
    :

    There is NO WAY to disable right click, for javascript at least. I have gotten around it. I see these people using the 'oops cant do that here' scripts, i just hit ok and right click right as it goes away and the browser doesnt have enough time to retrigger the right click prevent so it pops up the menu. who cares if they look at your source, when u post on the internet its basically open source in a sense, weither you want them to take it or not, they will. There is a way using php probably, you call in other pages that have the actual text, so when they view source it looks like

    or so.
    just an idea. its what big corperations do to theirs when they are greedy about their site. look at hotmail.com.
  • FirestormFirestorm Posts: 162Member
    Of course you can disable rightclick!!!!!!
    I knew a better way of doing this but I've forgotten it,
    but here is a stupid example that also can disable (any click) on the body:
    [code]
    <!DOCTYPE = html
    PUBLIC "-//W3C//DTD XHTML1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml/1-Strict.dtd">




    disable rightclick

    function clic()
    {!write HERE what you want the script to do eg. reload the page
    !note that leftclick is also an "mousedown" event!!}

    function button()
    {
    window.open(location="http://www.yahoo.com")
    }







    [/code]
    Firestorm
    blue_surfer2000@yahoo.de
    ;-)

  • iDaZeiDaZe Posts: 464Member
    :
    :
    :
    : Try that! I have allso give you a new look button :)
    :
    :
    : your dev
    :

    this is all nice and stuff, but it still doesn't prevent people from viewing the code if they want to

  • paulfppaulfp Posts: 13Member
    what do you want to hide so much??

    use ASP or PHP and execute your scripts on the server side so that they're turned into HTML before the user ever gets a chance to see them.
    =====
    paulfp
    www.paulfp.co.uk/delirious

Sign In or Register to comment.