[Javascript] js in chrome vs firefox

jm jm5379 at gmail.com
Thu Jan 13 09:25:54 CST 2011


John and Phillip,

not the type of answer i was hoping for but thanks for the info.
seems sad that an additional layer of complexity should be necessary
to deal with what is effectively nothing more than how the different
browsers choose to work with exactly the same data.  the only
difference is in chrome using what appears to be an array index for
the data consisting of the element names, whereas firefox and even ie
can access the names directly.

Phillip, i'll try the item.name version you suggest; with all the
variations i've attempted i'm not sure if i've already done so or not.
 using just 'item' did end up a stellar example of what i was dealing
with, though.

thanks to all who offered interest and suggestions.
joe


On Wed, Jan 12, 2011 at 7:17 PM, Philip Thompson <philthathril at gmail.com> wrote:
> I agree with John. I use Mootools and haven't had many chrome-only issues.
>
> As far as your code is concerned, shouldn't this line....
>
> itemList += ', ' + item;
>
> be something like this...
>
> itemList += ', ' + item.name;
>
> You're appending actual elements, which may be why you're getting odd outputs. IDK. Something from a library might look like so...
>
> $$('#registration input[type!=button],select,textarea').each(function (item) {
>    var name = item.get('name');
>    itemList += ', '+name;
>    if (name.match(/^memorabilia/)) { ... }
> });
>
> Hope this helps you figure out your problem. Happy coding.
>
> ~Philip
>
>
> On Jan 12, 2011, at 4:41 PM, John Warner wrote:
>
>> When dealing with chrome best advice I've seen is jQuery or one of the
>> other well established libraries.
>>
>> John Warner
>>
>>
>>> -----Original Message-----
>>> From: javascript-bounces at lists.evolt.org [mailto:javascript-
>>> bounces at lists.evolt.org] On Behalf Of Paul M Foster
>>> Sent: Wednesday, January 12, 2011 3:10 PM
>>> To: javascript at lists.evolt.org
>>> Subject: Re: [Javascript] js in chrome vs firefox
>>>
>>> On Wed, Jan 12, 2011 at 01:53:08PM -0600, jm wrote:
>>>
>>>> js and oo are not my strong points so bear with me as i undoubtedly
>>>> miss the proper naming conventions.  i have a page where one small
>>>> portion behaves differently in chrome than it does in firefox and even
>>>> ie.  the part in question is a group of text inputs where the user can
>>>> enter the number of items they wish to purchase (1 of this item, 4 of
>>>> that item, etc.)  as each field is populated, a dynamic table is
>>>> recreated at the bottom of the page showing the new counts and
>>>> purchase prices.  this works perfectly in firefox and ie (amazingly
>>>> enough) but refuses to update properly in chrome.  below is the part
>>>> of the script in question:
>>>
>>> I don't know the answer, but I feel your pain. It's why I don't use
>>> Chrome. When it first came out, I tried to run some of our internal
>>> websites on it (which contain a minimal amount of Javascript). It would
>>> not behave, and I couldn't imagine why. So if you find an answer, I'm
>>> interested.
>>>
>>> Paul
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
>



-- 
since this is a gmail account, please verify the mailing list is
included in the reply-to addresses.
also, i Never forward info on products of any sort so if you get
anything promoting any product period, ignore and delete it.  i have
received a number of failed delivery notices indicating my email
address is being used without my knowledge or permission.


More information about the Javascript mailing list