Showing posts with label Internet/Windows. Show all posts
Showing posts with label Internet/Windows. Show all posts

Monday, 12 November 2012

Preventing the backbutton not to go to the previous URL when the control is in focus inside a textbox, textarea or radio button in any browser


While developing a website in Asp.net MVC4, I noticed that when my control is in focus inside a text-box or text-area, which are read only, it is moving to the parent of the current URL. In order to solve it i had written a JQuery below which will prevent the back to the parent URL in any browser and in any web developing programming languages.


    $(document).keydown(function(e) {
        var doPrevent;
        if (e.keyCode == 8) {
            var d = e.srcElement || e.target;
            if (d.tagName.toUpperCase() == 'INPUT' || d.tagName.toUpperCase() == 'TEXTAREA') {
                doPrevent = d.readOnly || d.disabled;
            }
            else
                doPrevent = true;
        }
        else
            doPrevent = false;

        if (doPrevent)
            e.preventDefault();
    });



Enjoy!..........

Monday, 26 March 2012

How to lock Your private folder without using any software.


  • First select Your folder which you want to lock. Suppose paint is my private folder and it stored into E:\ drive.
  • In the same drive ( e.g. E:\) you need to create two bat file. Create a new text file there & Open it in note pad. Type in:

    Quote:
    ren paint paint.{21EC2020-3AEA-1069-A2DD-08002B30309D}
    Save it in as lock.bat
  • Again open another text file and type
    Quote:
    ren paint.{21EC2020-3AEA-1069-A2DD-08002B30309D} paint
    Now save this as a unlock.bat .

Now you can see 2 batch files lock and unlock.Double click on Press lock.bat and the folder paint's icon will change to control panel and you cannot view its contents.

Double click on unlock.bat and you will get back your original folder.

Thursday, 15 December 2011

"The proxy server is refusing connections"

Got to Internet settings/Internet Options in control panel.
Then connections, then LAN. turn OFF any reference to proxies, configuration files or similar.

Now your system will work fine.