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!
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 <h4>Filter Tickets</h4> <p>Filter tickets by status.</p> <form id=''filter'' class=''filter'' action="/tickets" method="get"> <p> <%= 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()" %> </p> </form> Resulting HTML page source <h4>Filter Tickets</h4> <p>Filter tickets by status.</p> <form id=''filter'' class=''filter'' action="/tickets" method="get"> <p> <input id="commit" name="commit" type="hidden" value="Filter" /> <select id="status" name="status" onchange="this.up(''.filter'').submit ()"><option value="1">Open</option> <option value="2">Accepted</option> <option value="3">In Progress</option> <option value="4">Completed</option> <option value="5" selected="selected">All</option> <option value="6">Invalid</option></select> </p> </form> </p> HELP! On May 15, 3:41 pm, Ram <yourstruly.vi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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!
I seem to recall that not all JS implementations return Prototype- extended objects. Try using $(this) instead. --Matt Jones On May 15, 6:50 am, Ram <yourstruly.vi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> 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 > > <h4>Filter Tickets</h4> > <p>Filter tickets by status.</p> > <form id=''filter'' class=''filter'' action="/tickets" method="get"> > <p> > <%= 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()" %> > </p> > </form> > > Resulting HTML page source > > <h4>Filter Tickets</h4> > <p>Filter tickets by status.</p> > <form id=''filter'' class=''filter'' action="/tickets" method="get"> > <p> > <input id="commit" name="commit" type="hidden" value="Filter" /> > <select id="status" name="status" onchange="this.up(''.filter'').submit > ()"><option value="1">Open</option> > <option value="2">Accepted</option> > <option value="3">In Progress</option> > <option value="4">Completed</option> > <option value="5" selected="selected">All</option> > <option value="6">Invalid</option></select> > </p> > </form> > </p> > > HELP! > > On May 15, 3:41 pm, Ram <yourstruly.vi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > 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!