Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #15390 > unrolled thread
| Started by | Larz <wbsurfver@gmail.com> |
|---|---|
| First post | 2012-08-17 14:12 -0700 |
| Last post | 2012-08-23 22:39 -0700 |
| Articles | 8 — 5 participants |
Back to article view | Back to comp.lang.javascript
objected oriented JS in IE Larz <wbsurfver@gmail.com> - 2012-08-17 14:12 -0700
Re: objected oriented JS in IE Ross McKay <au.org.zeta.at.rosko@invalid.invalid> - 2012-08-18 12:38 +1000
Re: objected oriented JS in IE Denis McMahon <denismfmcmahon@gmail.com> - 2012-08-18 11:08 +0000
Re: objected oriented JS in IE Robert Baer <robertbaer@localnet.com> - 2012-08-18 19:52 -0700
Re: objected oriented JS in IE Gregor Kofler <usenet@gregorkofler.com> - 2012-08-19 15:49 +0200
Re: objected oriented JS in IE Robert Baer <robertbaer@localnet.com> - 2012-08-20 12:36 -0700
Re: objected oriented JS in IE Gregor Kofler <usenet@gregorkofler.com> - 2012-08-21 17:04 +0200
Re: objected oriented JS in IE Robert Baer <robertbaer@localnet.com> - 2012-08-23 22:39 -0700
| From | Larz <wbsurfver@gmail.com> |
|---|---|
| Date | 2012-08-17 14:12 -0700 |
| Subject | objected oriented JS in IE |
| Message-ID | <ee7bd2ed-bc13-470c-91de-6d44dafbd098@googlegroups.com> |
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);
}
});
[toc] | [next] | [standalone]
| From | Ross McKay <au.org.zeta.at.rosko@invalid.invalid> |
|---|---|
| Date | 2012-08-18 12:38 +1000 |
| Message-ID | <pvvt28191oc7felhr41ao8ksk6tjvis04j@4ax.com> |
| In reply to | #15390 |
On Fri, 17 Aug 2012 14:12:43 -0700 (PDT), Larz wrote:
>[...]
> self = this;
What is the scope of "self"? Since you haven't preceded it with "var", I
suspect it is global. Try instead:
var self = this;
--
Ross McKay, Toronto, NSW Australia
"Let the laddie play wi the knife - he'll learn"
- The Wee Book of Calvin
[toc] | [prev] | [next] | [standalone]
| From | Denis McMahon <denismfmcmahon@gmail.com> |
|---|---|
| Date | 2012-08-18 11:08 +0000 |
| Message-ID | <k0nt2h$uhj$2@dont-email.me> |
| In reply to | #15390 |
On Fri, 17 Aug 2012 14:12:43 -0700, Larz wrote:
> $("#add-parameter-modal").modal('hide');
jquery (I think) or similar detected, ask in the support forum for your
library.
Rgds
Denis McMahon
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2012-08-18 19:52 -0700 |
| Message-ID | <obednVG3t5N2ya3NnZ2dnUVZ_q2dnZ2d@posted.localnet> |
| In reply to | #15390 |
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).
[toc] | [prev] | [next] | [standalone]
| From | Gregor Kofler <usenet@gregorkofler.com> |
|---|---|
| Date | 2012-08-19 15:49 +0200 |
| Message-ID | <k0qqsu$v80$1@dont-email.me> |
| In reply to | #15447 |
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
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2012-08-20 12:36 -0700 |
| Message-ID | <ddCdnfehDMswDK_NnZ2dnUVZ_gWdnZ2d@posted.localnet> |
| In reply to | #15452 |
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?
[toc] | [prev] | [next] | [standalone]
| From | Gregor Kofler <usenet@gregorkofler.com> |
|---|---|
| Date | 2012-08-21 17:04 +0200 |
| Message-ID | <k10814$3qo$1@dont-email.me> |
| In reply to | #15469 |
Am 2012-08-20 21:36, Robert Baer meinte:
> 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?
comp.infosystems.www.authoring.stylesheets
comp.infosystems.www.authoring.html
You already know alt.html
If your markup validates, Chrome and Firefox and IE8 will most likely
render identical.
Gregor
[toc] | [prev] | [next] | [standalone]
| From | Robert Baer <robertbaer@localnet.com> |
|---|---|
| Date | 2012-08-23 22:39 -0700 |
| Message-ID | <R7Kdnf4-v9gpjqrNnZ2dnUVZ_t6dnZ2d@posted.localnet> |
| In reply to | #15482 |
Gregor Kofler wrote:
> Am 2012-08-20 21:36, Robert Baer meinte:
>> 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?
>
> comp.infosystems.www.authoring.stylesheets
> comp.infosystems.www.authoring.html
>
> You already know alt.html
>
> If your markup validates, Chrome and Firefox and IE8 will most likely
> render identical.
>
> Gregor
>
My problem is that it does validate, FireFox, IE6, 7, 8, and 9 all
show all of the data[1] but Chrome and Opera[2] both futz it up,
refusing to display some data and scrambling some things as well (both
give virtually identical crap).
IE5 is superior to them.
So..is there a reliable way to "discover" that a client's browser is
one of those POJs and then automatically "jump" to a different "site"?
[1] FF & IE9 identical and "perfect".
IE6, 7, & 8 very similar to each other - at least i have them
brow-beaten to NOT put anything beyond 800px to right (but scroll bar is
there).
Let vertical bars indicate left and right part of 800px wide
screen, in area where part of the display should be:
| Aa Bb |
| aa b |
the display was:
| Aaaa |
| Bbb |
Many hours of fussing / experimenting has not fixed that even tho
the widths of the columns are finally decent:
| Aa |
| aa |
| Bb |
| b |
[2] Both are the most recent versions running in Win7.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.javascript
csiph-web