I have JavaScript that is doing activity periodically. When the user is not looking at the site (i.e., the window or tab does not have focus), it'd be nice to not run.  Is there a way to do this using JavaScript?  My reference point: Gmail Chat...
How can I detect the page zoom level in all modern browsers? While this thread tells how to do it in IE7 and IE8, I can't find a good cross-browser solution. Firefox stores the page zoom level for future access. On the first page load, would I...
I am doing an online quiz app in php. I want to restrict the user from going back in an exam. I have tried the following script but it stops my timer. What should I do?  I have included the source code. The timer is stored in cdtimer.js  <script...
I have tried many methods to detect browser close event through jQuery or JavaScript. But, unfortunately, I have not been able to detect the close. The onbeforeunload and onunload methods are also not working.  How do I detect the window close, unl...
I have seen this question asked in a couple of different ways on SO and several other websites, but most of them are either too specific or out-of-date. I'm hoping someone can provide a definitive answer here without pandering to speculation....
I have tried using the code below but it only display results in Chrome and Mozilla not working in IE6.   <div id="example"></div>  <script type="text/javascript">  txt = "<p>Browser CodeName: " + nav...
I have a website (Flash) localized into a dozen of languages and I want to auto-define a default value depending on the user's browser settings in order to minimize the steps to access the content.  FYI, I cannot use server-scripts due to proxy...
Is it possible to hide the Javascript code from the html of a webpage, when the source code is viewed through the browsers View Source feature?   I know it is possible to obfuscate the code, but I would prefer it being hidden from the view source f...
If I for example have   <p> some long text </p>   on my HTML page, how can I know that cursor of mouse is for example above the word 'text'?...
When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event. When we close the browser (X on right top icon),It will trigger ONUNLOAD event. Now when ONUNLOAD event is triggered, there is no way to distinguish between re...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.