# Custom JS breaking in IE6,7 - Tips on debugging?

**URL:** <https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066>\
**Category:** Rails\
**Created:** [May 15, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066 "2009-05-15T12:42:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [May 15, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066/1 "2009-05-15T12:42:08Z")

</div>

Hi all,

I just got around to testing my application in IE6 and 7 and I  
discovered that my custom Javascripts dont work and seem to break the  
HTML and CSS in the page too.

Any tips or resources that I can read up to make my JS IE compatible?  
Your experiences and thoughts? I coudl post some of my code here if  
anyone could help me with it.

Hope to get some pointers… Thanks!

---

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [May 15, 2009, 1:51pm UTC](https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066/2 "2009-05-15T13:51:26Z")

</div>

This is the smallest piece of custom JS thats NOT working. Is the  
method of DOM reference im using wrong? Im using the this.up and  
this.down methods all over my custom JS.

Ruby/Rails code

#### Filter Tickets

Filter tickets by status.

\<%= hidden\_field\_tag :commit, "Filter"%\> \<%= select\_tag "status", options\_from\_collection\_for\_select (Status.find(:all), :id, :status,selected\_status(params [:status])), :onchange =\> "this.up('.filter').submit()" %\>

Resulting HTML page source

#### Filter Tickets

Filter tickets by status.

Open Accepted In Progress Completed All Invalid

HELP!

---

<div class="post-metadata">

**Author:** ![ram](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/b9bd4f/32.png) [@ram](https://www.ruby-forum.com/u/ram)\
**Post date:** [May 16, 2009, 5:08pm UTC](https://www.ruby-forum.com/t/custom-js-breaking-in-ie6-7-tips-on-debugging/168066/3 "2009-05-16T17:08:03Z")

</div>

I seem to recall that not all JS implementations return Prototype-  
extended objects. Try using $(this) instead.

–Matt J.
