browser behaviour with js on scene load
i wanted to run a prompt to enter a name into a js prompt on loading a scene and noticed different behaviour between browsers. both safari and chrome show the prompt before anything on the page is visible, while firefox shows the scene with the prompt in focus (see attached)

[browseronsceneload.zip](/uploads/short-url/ugphz9tphevgiy5lcyd2znbjc4x.zip) …
a couple of things.

when an element is 0 opacity it still retains its mouse/pointer events.

so even though you cannot see it, it still intercepts the clicks before any element under it.

[image] muzz:

even if moved off the screen by timeline.

a symbol is still an element and if it is on sce…
You can detect the browser in use and display the message. You can even have it hide the page content unless the browser used is Internet Explorer. However, there's no way to use JavaScript (or any other web dev. code) to open a completely separate program.



If you are really determined, you might try looking into something that indirectly opens another program through an object or applet of some kind, like flash or Java applets. I don't think you'll find anything, though.



If this were possible, it would be a security problem. Consider the situation if IE had a known exploit and it were possible to force a page to open in IE regardless of the browser it was originally opened in.



I recommend fixing your site. It's not that difficult to develop pages that work everywhere. If I develop pages in accordance with the W3C recommendations, they work pretty well in Firefox, Safari, Opera, and Chrome. Then it's not too difficult to tweak them to work in IE. I've found that doing it the other way around, targeting IE first then tweaking it to work in other browsers, is much more difficult. Pages that require Microsoft ActiveX plugins are an exception of course, but I think it's well worth the time to find an alternative.



--  

-- Ghodmode **So........What does that tell you  

Hopefully it tells you IE suks and hopefully you will use a different browser like mozzila.** May be the function is executed before the document is ready.
Try to use document.ready function like this:



```
$( document ).ready(function() {
    $('#machines').change(function() {
        var $selected = $(this).find(':selected');
        $('#description').html($selected.data('description'));
    }).trigger('change');
});

``` i just figured out what the problem was. if you enable the “titlebar” in firefox’s “customize…” window (it is a checkbox at the bottom) then the traditional window titlebar appears (with the buttons on the left) and the click and drag thing works. who knew? Once an image has been loaded in any way into the browser, it will be in the browser cache and will load much faster the next time it is used whether that use is in the current page or in any other page as long as the image is used before it expires from the browser cache.


So, to precache images, all you have to do is load them into the browser. If you want to precache a bunch of images, it's probably best to do it with javascript as it generally won't hold up the page load when done from javascript. You can do that like this:



```
function preloadImages(array) {
    if (!preloadImages.list) {
        preloadImages.list = [];
    }
    var list = preloadImages.list;
    for (var i = 0; i < array.length; i++) {
        var img = new Image();
        img.onload = function() {
            var index = list.indexOf(this);
            if (index !== -1) {
                // remove image from the array once it's loaded
                // for memory consumption reasons
                list.splice(index, 1);
            }
        }
        list.push(img);
        img.src = array[i];
    }
}

preloadImages(["url1.jpg", "url2.jpg", "url3.jpg"]);

```

This function can be called as many times as you want and each time, it will just add more images to the precache.


Once images have been preloaded like this via javascript, the browser will have them in its cache and you can just refer to the normal URLs in other places (in your web pages) and the browser will fetch that URL from its cache rather than over the network.


Eventually over time, the browser cache may fill up and toss the oldest things that haven't been used in awhile. So eventually, the images will get flushed out of the cache, but they should stay there for awhile (depending upon how large the cache is and how much other browsing is done). Everytime the images are actually preloaded again or used in a web page, it refreshes their position in the browser cache automatically so they are less likely to get flushed out of the cache.


The browser cache is cross-page so it works for any page loaded into the browser. So you can precache in one place in your site and the browser cache will then work for all the other pages on your site.







When precaching as above, the images are loaded asynchronously so they will not block the loading or display of your page. But, if your page has lots of images of its own, these precache images can compete for bandwidth or connections with the images that are displayed in your page. Normally, this isn't a noticeable issue, but on a slow connection, this precaching could slow down the loading of the main page. If it was OK for preload images to be loaded last, then you could use a version of the function that would wait to start the preloading until after all other page resources were already loaded.



```
function preloadImages(array, waitForOtherResources, timeout) {
    var loaded = false, list = preloadImages.list, imgs = array.slice(0), t = timeout || 15*1000, timer;
    if (!preloadImages.list) {
        preloadImages.list = [];
    }
    if (!waitForOtherResources || document.readyState  'complete') {
        loadNow();
    } else {
        window.addEventListener("load", function() {
            clearTimeout(timer);
            loadNow();
        });
        // in case window.addEventListener doesn't get called (sometimes some resource gets stuck)
        // then preload the images anyway after some timeout time
        timer = setTimeout(loadNow, t);
    }

    function loadNow() {
        if (!loaded) {
            loaded = true;
            for (var i = 0; i < imgs.length; i++) {
                var img = new Image();
                img.onload = img.onerror = img.onabort = function() {
                    var index = list.indexOf(this);
                    if (index !== -1) {
                        // remove image from the array once it's loaded
                        // for memory consumption reasons
                        list.splice(index, 1);
                    }
                }
                list.push(img);
                img.src = imgs[i];
            }
        }
    }
}

preloadImages(["url1.jpg", "url2.jpg", "url3.jpg"], true);
preloadImages(["url99.jpg", "url98.jpg"], true);

``` [tutorial] how to view cookies - how to view cookies is an article on the wikihow website that explains all the steps you should follow if you want to view your browser's cookies. it explains how to do this on google chrome, firefox, microsoft edge, internet explorer, and safari. I had the same problem a couple of months back. Now if this is happening only with Chrome and not with other browsers, then the problem cannot be a virus. But it can be a virus if other browsers and programs are facing equal problems.  
  
So, with chrome as we all know there is a memory problem. So to solve that follow these simple steps.  
  
1. On the top right menu icon, select History  
2. From there select "clear browsing data"  
3. It will prompt for the time span, there you select "beginning of time"  
4. You might lose few data like saved passwords, favorites, but no data will be removed which are saved properly.  
  
After you are done with this, clean your system with Disk Cleaning Software. While doing this don't keep any browser window open especially Chrome.  
If you notice, it is skipping out the Chrome from the list, you have to select the program manually and click on "clear".  
  
After this restart your system and see if it works. If it doesn't then you have to undergo the entire process of uninstalling and re-installing Chrome. from the apple menu

1. choose system preferences from the apple menu.
2. click general.
3. choose firefox from the default web browser drop-down menu. JavaScript *itself* has nothing built in for handling query string parameters. 


Code running in a (modern) browser you can use the [`URL` object](https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams) (which is part of the APIs provided by browsers to JS):





```
var url_string = "http://www.example.com/t.html?a=1&b=3&c=m2-m3-m4-m5"; //window.location.href
var url = new URL(url_string);
var c = url.searchParams.get("c");
console.log(c);
```









For older browsers (including Internet Explorer), you can use [this polyfill](https://github.com/ungap/url-search-params) or the code from the original version of this answer that predates `URL`:


You could access `location.search`, which would give you from the `?` character on to the end of the URL or the start of the fragment identifier (#foo), whichever comes first.


Then you can parse it with this:





```
function parse_query_string(query) {
  var vars = query.split("&");
  var query_string = {};
  for (var i = 0; i < vars.length; i++) {
    var pair = vars[i].split("=");
    var key = decodeURIComponent(pair[0]);
    var value = decodeURIComponent(pair[1]);
    // If first entry with this name
    if (typeof query_string[key]  "undefined") {
      query_string[key] = decodeURIComponent(value);
      // If second entry with this name
    } else if (typeof query_string[key]  "string") {
      var arr = [query_string[key], decodeURIComponent(value)];
      query_string[key] = arr;
      // If third or later entry with this name
    } else {
      query_string[key].push(decodeURIComponent(value));
    }
  }
  return query_string;
}

var query_string = "a=1&b=3&c=m2-m3-m4-m5";
var parsed_qs = parse_query_string(query_string);
console.log(parsed_qs.c);
```




You can get the query string from the URL of the current page with:



```
var query = window.location.search.substring(1);
var qs = parse_query_string(query);

``` > 
> 
> | Averdahl wrote:The question is Why and will it be fixed? |
> 
> 

Most likely because despite [all their bluster about loving freedom of choice](http://blogs.adobe.com/conversations/2010/05/freedom_of_choice.html), that freedom of choice does not extend to letting people choose their own browser by sticking to published, open standards.

It will not be fixed. The excuse Jive (the vendor of these forums) uses is that Opera's "[JavaScript engine refuses to load our RTE for one reason or another](http://www.jivesoftware.com/jivespace/message/277836#277836)". After Opera itself stepped in and contacted Jive that [the RTE did actually work](http://www.jivesoftware.com/jivespace/message/266797#266797), Jive changed its tune and 2 months ago stopped blaming Opera and simply wrote that "[At this time we are not planning on supporting Opera](http://www.jivesoftware.com/jivespace/message/360229#360229)".