# Addeventlistener on url for change?

**URL:** <https://forum.kirupa.com/t/addeventlistener-on-url-for-change/301313>\
**Category:** Uncategorized\
**Created:** [December 7, 2009, 3:33pm UTC](https://forum.kirupa.com/t/addeventlistener-on-url-for-change/301313 "2009-12-07T15:33:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bardic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bardic/32/3708_2.png) [@bardic](https://forum.kirupa.com/u/bardic)\
**Post date:** [December 7, 2009, 3:33pm UTC](https://forum.kirupa.com/t/addeventlistener-on-url-for-change/301313/1 "2009-12-07T15:33:20Z")

</div>

Hey all,  
I’m like to add an eventlistener to a script i’m working on that fires whenever the url is change but so far I’m not having any luck. I’m not even sure if this is possible \>.\<

Here’s what I’ve been trying :

```auto

var url = document.location;
url.addEventListener('urlChange',onChange,false)

```

Should I just use a setInterval?

Thanks
