Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.localnet!news.posted.localnet.POSTED!not-for-mail NNTP-Posting-Date: Mon, 20 Aug 2012 14:36:13 -0500 Date: Mon, 20 Aug 2012 12:36:12 -0700 From: Robert Baer User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:10.0.1) Gecko/20120208 Firefox/10.0.1 SeaMonkey/2.7.1 MIME-Version: 1.0 Newsgroups: comp.lang.javascript Subject: Re: objected oriented JS in IE References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Lines: 38 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 67.168.185.228 X-Trace: sv3-FphhY+qnK9gVsfIWz6dIKMV/MjCPkKI9eHxJDHKA5001QRwHA4dPQ2g8k9EQ0EqWWbsJGIKPf3l3UbB!4DnvH0wZn7v9bC2DL3IVjts+mrTRsJMC8EW0Zzx5VGjkJ6ShUND6kHkPD5VXP5KryeJGbh1ZEenL!J0LHFICfBxoIrVTTT9gycwToj3abgbW9 X-Complaints-To: abuse@localnet.com X-DMCA-Complaints-To: abuse@localnet.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2791 X-Received-Bytes: 2932 Xref: csiph.com comp.lang.javascript:15469 Gregor Kofler wrote: > Am 2012-08-19 04:52, Robert Baer meinte: >> Larz wrote: >>> I have some objected oriented JS that has been working fine in firefox, >>> the use of self=this (and self is then used in the callback after >>> that) however in the code below does not work in IE for me. I am using >>> IE 8 at the moment, though it is IE 9 that we will have to support. >>> What is best approach ? >>> >>> this.upd_params = function () { >>> $("#add-parameter-modal").modal('hide'); >>> >>> var param_form = $('#add_param_form'); >>> self = this; >>> this.added_params = []; >>> this.removed_params = []; >>> >>> $('.unused_parameter').each(function (index, obj) { >>> if (obj.checked) { >>> id = self.get_idnum(obj.id); >>> self.add_param2list(id); >>> } >>> }); >> You may find that if you get something to work in IE8, that it will >> work everywhere else with the possible exception of Chrome (IE5 does >> better). > > Er... what? Anyway, when did you start *giving* advice in JS? > > To clarify things: scripts that are designed to work in IE8 will rarely > work in any standards compliant browser (i.e. Chrome/Chromium, Firefox, > Safari, Opera, etc.) > > Gregor I am no a programmer, do not really know HTML or CSS,but have been able to do some modifications where IE8 and FireFox give similar rendering; Chrome totally futzes the result. Do need help in that area; where should i place a detailed query?