Jump to content

ishan_shah

Members
  • Posts

    90
  • Joined

  • Last visited

Posts posted by ishan_shah

  1. Try to make sure you have called right event on every  position like onMouseUp, onMouseDown.
    Recheck your code ,if it doesn't solve it please provide your code so others can take a decent look into your problem.

  2. try this:

    <form>
    <select name="list" id="list" accesskey="target">
        <option value='none' selected>Choose a theme</option>
        <option value="https://en.wikipedia.org/wiki/New_Delhi">New Delhi</option>
        <option value="https://en.wikipedia.org/wiki/Gujarat">Gujarat</option>
        <option value="https://en.wikipedia.org/wiki/New_Delhi">New delhi</option>
    </select>
    <input type=button value="Go" onclick="goToNewPage()" />
    </form>

    and JS file:

     function goToNewPage()
        {
            var url = document.getElementById('list').value;
            if(url != 'none') {
                window.location = url;
            }
        }

     

  3. If you use Google Chrome and want to turn off video autoplay — you can’t. There used to be an experimental command-line flag that allowed you to turn them off (you can find the flags by typing chrome://flags/ into Chrome’s address field), but it’s disappeared.

     

    Microsoft’s Edge browser, which is also based on the Chromium open-source design, does let you turn off — well, at least, limit — video autoplay:

    • Click on the three dots in the upper right corner and select “Settings.”
    • In the left-hand column, click on “Site Permissions,” and then scroll down to and select “Media autoplay.”

    You can either allow audio and video to play automatically or limit it. According to the instructions, whether autoplay will work or not will depend on “how you’ve visited the page and whether you interacted with media in the past.”

    Firefox has a similar feature that lets you turn off autoplay, for the most part.

    • Click on the three lines in the upper right corner of the browser and select “Preferences.”
    • In the left-hand column, click on “Privacy & Security.”
    • Scroll down to the section headed “Permissions” and look for “Autoplay.” Click on the button marked “Settings.”

    A drop-down menu will let you allow audio and video, block audio, or block audio and video. You can also specify sites that you want to differ from your defaults — for example, if you block audio and video as a default, but you want to allow it for, say, The Verge.

    Safari makes it simple to disable autoplay. In fact, it assumes that you want the feature disabled to begin with. However, if it hasn’t been disabled — or if you want to make some exceptions to the rule — here’s what you do:

    • While in the app, go to Safari > Preferences in the top menu.
    • Click on “Websites” in the top menu.
    • Look for and select “Auto-Play” in the side menu.
    • Look for the drop-down menu at the bottom right of the window and select “Never Auto-Play.”

    As with Firefox, you can whitelist any sites that you want to be an exception to the rule.

  4. Normal reload

    The same thing as pressing 'F5'. This will use the cache but revalidate everything during page load, looking for "304 Not Modified" responses. If the browser can avoid re-downloading cached JavaScript files, images, text files, etc. then it will.

     

    Hard reload

    Don't use anything in the cache when making the request. (which is equal to SHIFT+F5 No need to open Developer console) Force the browser do re-download every JavaScript file, image, text file, etc

  5. TypeScript compiler will check the type to surface more typing errors at compiling time.

    A practical example is if we use the wrong data type in the browser beacon, we now get compiling errors. Before migrating to Typescript, they could only be found by testing against the back-end.

    for example:

     

    var name: string;
    name = 2; // type error, assign a number to a string type variable
    
    function foo(value: number) {}
    foo(''); // type error, use a number as a string type parameter
    
    interface Bar {
        setName: (name: string) => void;
        getName: () => string;
    }
    
    
    var bar: Bar = {
        getName: function() {
            return 'myName';
        }
    } // type error, 

     

  6. By default you can set that X property for 

    display:none

    And now you can nwritejs for onChange event of that text area

    function onChange (){
    if(document.getElementById("field").value != '')
    {
        document.getElementById("X").style.display ="";
    }
    }

     

×
×
  • Create New...