Tagged Questions

34
votes
10answers
19k views

Is there any kind of hashCode function in javascript?

Basically what I'm trying to do is create an object of unique objects, a set. I had the brilliant idea of just using a JS object with objects for the property names. Such as, set[obj] = true; This ...
72
votes
12answers
34k views

How do you determine equality for two JavaScript objects?

A strict equality operator will tell you if two object types are equal, however, is there any way to tell if two objects are equal, much like the hash code value in Java? This is similar to this ...
1
vote
2answers
256 views

location.hash and back history

Is there a function that can be called to prevent the browser from recording a back history entry when changing the hash value? I am writing a simple javascript gallery that changes the browser url ...
4
votes
2answers
57 views

adding a JavaScript object to multiple arrays

I have the following JavaScripts objects: var foo = {"foofoo":value}; var bar = {"barbar":value2}; //and so on these objects will be added to several arrays: var container = [foo, bar, baz, etc]; ...
1
vote
2answers
299 views

How to get url params when using hash in url

I am using AJAX with hash in URL with prototypejs. When I use following URL: http://example.com/#/example/104?v=0&d=a&rpp=10 print_r( $_GET ); // output: array() When I use following ...
0
votes
1answer
235 views

How to implement history plugin for prototypejs?

I am using AJAX with prototypejs. Now I want to use browser's back/forward button to redirect to already visited AJAX links. I found this plugin but I don't know which file I have to include in my ...
0
votes
2answers
540 views

Prevent page redirect when using hash tag

Is there any way to redirect a page to a specific hash but prevent the redirect if the page is reloaded with a hash already present? Preferably with javascript? For example: typing in ...