JS strangeness

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Gregor Kofler

    #16
    Re: JS strangeness

    Hamish Campbell meinte:
    Hey Pink,
    >
    The jQuery google group is excellent:

    >
    Plenty of people there (including myself) willing to help out. Try to
    post a link to a sample site if possible.
    From the information given by the OP, they were equally helpless.
    Unfortunately this group can be a little.. old school.
    No. It's just that this group is about JavaScript (and its other brand
    names) and not about some libraries written in JS. Just as PHP NGs are
    about PHP and not some third party applications written in PHP. And just
    as C/C++ NGs are not dealing with the problems of applications written
    in these languages. You get the idea?
    they're all but blind to the benefits that jQuery (and
    the other hated libraries) bring to real world developers.
    Makes one wonder why all those problems (I suppose I should say
    "questions" ) of such "real world developers" come from...

    Gregor


    --
    http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
    http://web.gregorkofler.com ::: meine JS-Spielwiese
    http://www.image2d.com ::: Bildagentur für den alpinen Raum

    Comment

    • Aaron Gray

      #17
      Re: JS strangeness

      "Thomas 'PointedEars' Lahn" <PointedEars@we b.dewrote in message
      news:488CCA87.6 050405@PointedE ars.de...
      Pink Pig wrote:
      >Thomas 'PointedEars' Lahn wrote:
      >>Pink Pig wrote:
      >>>[...] But often, Firebug reports that the variable 'calimg' is not
      >>>defined when the $(document).rea dy() function runs. What is causing
      >>>this,
      >>>and what can I do about it?
      >>Get a minimum clue and don't rely on junk like jQuery.
      >>>
      >><http://jibbering.com/faq/>
      >>[...]
      >>
      >This is really not a helpful response. You might at least point me to
      >the appropriate section of this massive document.
      >
      Try the section about how to post properly; it will lead to everything
      else.
      Thomas, You are turning into a bit of a troll. Could you say the same
      substance but in a more polite fashon please; as its degrading the list.

      Yeah, I never liked jQuery from the start, bumping into $("yyy"). when
      reading code was not a very nice experience.

      There's another library I have came accross that seems to do the same as
      jQuery but seems alot lighterweight and have not heard it mentioned on clj.



      Have not used it, but it has four figure version numbers and is up to
      2.7.1.1 so it _may_ be a good library.

      Anyone checked it out ?

      Aaron


      Comment

      • Aaron Gray

        #18
        Re: JS strangeness

        "Pink Pig" <bill@grandcent ralapartments.c omwrote in message
        news:d55594e9-4286-43df-9ed8-91e1a91a9340@i7 6g2000hsf.googl egroups.com...
        (I don't know if this question has been asked and answered many times,
        since I just joined this group and haven't attempted to search the
        archives.)
        >
        I have a page under construction which uses jQuery and is fairly
        massive. When I run it locally under Firefox, everything works fine,
        but when I run it on the host site, I frequently run into difficulties
        of the following type. I have a $(document).rea dy() function that
        references variables and elements defined either in other JS scripts
        (inline), or in the HTML. Sometimes, but not always, a reference to
        one of these variables or elements resolves to a null pointer, which
        aborts the execution of my $(document).rea dy() function and causes FF
        to get hung up in the wrong place. For example, I have a JS variable
        called 'calimg', which is supposed to be a string containing the URL
        of an image file, and if I look at the source, that is how it is
        defined, in a script that is placed before the script containing the $
        (document).read y() function. But often, Firebug reports that the
        variable 'calimg' is not defined when the $(document).rea dy() function
        runs. What is causing this, and what can I do about it?
        Yeah, sorry but you have to realize that if everyone is reading your
        question thet is X amount of time times Y readers, these whole threads are a
        waste of time and should be avoided, best for both sides not to start them
        in the first place.

        As they say a library is no substitute for knowing whats going on with "bare
        metal javascript".

        If there are issues with jQuery then take them to one of the jQuery
        disscussion lists :-



        comp.lang.javas cript is really for Javascript language issues, this is not
        alt.lang.javasc ript and maybe there should really be one.

        Aaron


        Comment

        • Aaron Gray

          #19
          Re: JS strangeness

          "Hamish Campbell" <HN.Campbell@gm ail.comwrote in message
          news:bbbe665a-ef4a-4fb6-9dae-0e8d04c2e480@a6 g2000prm.google groups.com...
          On Jul 28, 5:39 pm, jdalton <John.David.Dal ...@gmail.comwr ote:
          Unfortunately this group can be a little.. old school. I'm pretty sure

          Look at the UseNet groups title "comp.lang.java script" this sort of thing
          would not be tollerated on comp.lang.c or c++. Maybe we need a
          comp.lang.javas cript.misc or alt.javascript group for this sort of thing ?

          Regards,

          Aaron


          Comment

          • Aaron Gray

            #20
            Re: JS strangeness

            "jdalton" <John.David.Dal ton@gmail.comwr ote in message
            news:f638b118-5c97-4e11-b35d-371eaaaa1b97@p2 5g2000hsf.googl egroups.com...
            Also for fun you can read up on the various personalities here:
            http://redwing.hutman.net/~mreed/war...ssrebutter.htm
            No its happening because the 'comp.lang' group is not being used properly.

            Anyone can make fun and add a donations page that does not even render
            properly.

            Aaron


            Comment

            • Jorge

              #21
              Re: JS strangeness

              On Jul 28, 11:41 am, Hamish Campbell <HN.Campb...@gm ail.comwrote:
              ... could program JS with an Oscilloscope and a
              soldering iron if they really tried.
              ...and what's wrong with that ?

              --Jorge.

              Comment

              • Henry

                #22
                Re: JS strangeness

                On Jul 28, 4:01 pm, Aaron Gray wrote:
                <snip>
                There's another library I have came accross that seems to do the
                same as jQuery but seems alot lighterweight and have not heard it
                mentioned on clj.
                >
                       http://www.domassistant.com/
                >
                Have not used it, but it has four figure version numbers and is
                up to 2.7.1.1 so it _may_ be a good library.
                <snip>

                When reviewing John Resig's "Pro JavaScript Techniques" Robert Nyman,
                the original author of DOMAssistant, wrote; "I would say that any
                JavaScript web developer out there, from intermediate to advanced, can
                learn something sincerely valuable from this book.". To read that book
                and come to that conclusion does not bode well. It implies he uses a
                definition of "advanced" "JavaScript web developer" that does not
                involve the possession of the technical understanding that would
                result in the reader seeing the many faults and nonsenses in the book
                and so dismissing it out of hand as a learning source.

                Comment

                • Tim Streater

                  #23
                  Re: JS strangeness

                  In article
                  <47446f14-55e2-4d75-9db3-2e23ffc67ec6@f6 3g2000hsf.googl egroups.com>,
                  Jorge <jorge@jorgecha morro.comwrote:
                  On Jul 28, 11:41 am, Hamish Campbell <HN.Campb...@gm ail.comwrote:
                  ... could program JS with an Oscilloscope and a
                  soldering iron if they really tried.
                  >
                  ...and what's wrong with that ?
                  Personally I use a bar magnet and a magnifying glass. Saves amazing
                  amounts of CPU.

                  Comment

                  • Thomas 'PointedEars' Lahn

                    #24
                    Re: JS strangeness

                    Henry wrote:
                    When reviewing John Resig's "Pro JavaScript Techniques" Robert Nyman,
                    the original author of DOMAssistant, wrote; "I would say that any
                    JavaScript web developer out there, from intermediate to advanced, can
                    learn something sincerely valuable from this book.". To read that book
                    and come to that conclusion does not bode well. [...]
                    Well, there is certainly one valuable thing that can be learned from this
                    book: how not to write one ;-)


                    PointedEars
                    --
                    realism: HTML 4.01 Strict
                    evangelism: XHTML 1.0 Strict
                    madness: XHTML 1.1 as application/xhtml+xml
                    -- Bjoern Hoehrmann

                    Comment

                    • Jorge

                      #25
                      Re: JS strangeness

                      On Jul 28, 6:38 pm, Tim Streater <tim.strea...@d ante.org.ukwrot e:
                      In article
                      <47446f14-55e2-4d75-9db3-2e23ffc67...@f6 3g2000hsf.googl egroups.com>,
                      >
                       Jorge <jo...@jorgecha morro.comwrote:
                      On Jul 28, 11:41 am, Hamish Campbell <HN.Campb...@gm ail.comwrote:
                      ... could program JS with an Oscilloscope and a
                      soldering iron if they really tried.
                      >
                      ...and what's wrong with that ?
                      >
                      Personally I use a bar magnet and a magnifying glass. Saves amazing
                      amounts of CPU.
                      Oh, yes, the magnifying glass changed my life. But what's the magnet
                      for ?

                      --Jorge.

                      Comment

                      • Gregor Kofler

                        #26
                        Re: JS strangeness

                        Aaron Gray meinte:
                        There's another library I have came accross that seems to do the same as
                        jQuery but seems alot lighterweight and have not heard it mentioned on clj.
                        >

                        >
                        Have not used it, but it has four figure version numbers and is up to
                        2.7.1.1 so it _may_ be a good library.
                        Dunno...

                        line 6:
                        var isIE = /*@cc_on!@*/false;

                        line 1330:
                        if (/KHTML|WebKit|iC ab/i.test(navigato r.userAgent)) {
                        DOMLoadTimer = setInterval(fun ction () {
                        if (/loaded|complete/i.test(document .readyState)) {
                        DOMHasLoaded();
                        clearInterval(D OMLoadTimer);
                        }
                        }, 10);
                        }


                        And why would one want to do something like that:

                        window.addEvent = this.addEvent;
                        window.removeEv ent = this.removeEven t;


                        Gregor



                        --
                        http://photo.gregorkofler.at ::: Landschafts- und Reisefotografie
                        http://web.gregorkofler.com ::: meine JS-Spielwiese
                        http://www.image2d.com ::: Bildagentur für den alpinen Raum

                        Comment

                        • Dr J R Stockton

                          #27
                          Re: JS strangeness

                          In comp.lang.javas cript message <b7423ee2-9d42-4c73-9fc0-ab95455179d2@m3
                          g2000hsc.google groups.com>, Sun, 27 Jul 2008 12:18:24, Pink Pig
                          <bill@grandcent ralapartments.c omposted:
                          >On Jul 27, 2:51 pm, Thomas 'PointedEars' Lahn <PointedE...@we b.de>
                          >wrote:
                          >Pink Pig wrote:
                          [...] But often, Firebug reports that the variable 'calimg' is not
                          >PointedEars
                          >--
                          >This is really not a helpful response. You might at least point me to
                          >the appropriate section of this massive document.
                          if you had prudently read the newsgroup before posting, you would have
                          known what to expect from Lahn.

                          --
                          (c) John Stockton, nr London UK. ???@merlyn.demo n.co.uk Turnpike v6.05 MIME.
                          Web <URL:http://www.merlyn.demo n.co.uk/- FAQish topics, acronyms, & links.
                          Check boilerplate spelling -- error is a public sign of incompetence.
                          Never fully trust an article from a poster who gives no full real name.

                          Comment

                          • Hamish Campbell

                            #28
                            Re: JS strangeness

                            On Jul 28, 11:41�am, Hamish Campbell <HN.Campb...@gm ail.comwrote:
                            ... could program JS with an Oscilloscope and a
                            soldering iron if they really tried.
                            ...and what's wrong with that ?
                            >
                            Personally I use a bar magnet and a magnifying glass. Saves amazing
                            amounts of CPU.
                            Hehe. Yeah, my point was that there are serious experts in this forum,
                            but few programmers - even good ones - have the time/inclination/
                            ability to delve into the inner workings of JS (and even fewer get to
                            the point where they seem to be able to quote the spec at will!).

                            And hey, an accessible library like jQuery is [hopefully] a good entry
                            point for someone who will later learn *ahem* real JS.

                            Meanwhile, I'm fixing basic PHP/SQL injection issues because there are
                            plenty of php hobbyists who refuse to use frameworks because they
                            don't understand how they work (so they must be bad). It's basically
                            the reverse scenario - except that as far as I can see, it is better
                            to have someone bumbling around within a fixed set of functionality
                            than to be let loose to create havok in ways they don't understand.

                            return 'bye';

                            Comment

                            • David Mark

                              #29
                              Re: JS strangeness

                              On Jul 28, 5:08 pm, Hamish Campbell <HN.Campb...@gm ail.comwrote:
                              On Jul 28, 11:41�am, Hamish Campbell <HN.Campb...@gm ail.comwrote:
                              ... could program JS with an Oscilloscope and a
                              soldering iron if they really tried.
                              >
                              ...and what's wrong with that ?
                              >
                              Personally I use a bar magnet and a magnifying glass. Saves amazing
                              amounts of CPU.
                              >
                              Hehe. Yeah, my point was that there are serious experts in this forum,
                              but few programmers - even good ones - have the time/inclination/
                              ability to delve into the inner workings of JS (and even fewer get to
                              the point where they seem to be able to quote the spec at will!).
                              >
                              And hey, an accessible library like jQuery is [hopefully] a good entry
                              point for someone who will later learn *ahem* real JS.
                              That's what you fail to understand. It isn't. There is no argument
                              for it. Search the group. Thanks.

                              Comment

                              • RobG

                                #30
                                Re: JS strangeness

                                On Jul 29, 3:16 am, Gregor Kofler <use...@gregork ofler.atwrote:
                                Aaron Gray meinte:
                                >
                                There's another library I have came accross that seems to do the same as
                                jQuery but seems alot lighterweight and have not heard it mentioned on clj.
                                >>
                                Have not used it, but it has four figure version numbers and is up to
                                2.7.1.1 so it _may_ be a good library.
                                >
                                Dunno...
                                >
                                line 6:
                                var isIE = /*@cc_on!@*/false;
                                I guess it does that because shortly afterward it does:

                                var pushAll = function (set1, set2) {
                                for (var j=0, jL=set2.length; j<jL; j++) {
                                set1.push(set2[j]);
                                }
                                return set1;
                                };
                                if (isIE) {
                                pushAll = function (set1, set2) {
                                if (set2.slice) {
                                return set1.concat(set 2);
                                }
                                for (var i=0, iL=set2.length; i<iL; i++) {
                                set1[set1.length] = set2[i];
                                }
                                return set1;
                                };
                                }

                                [...]
                                >
                                And why would one want to do something like that:
                                Because the author(s) do no know how to implement effective feature
                                detection?

                                How about:

                                var HTMLArray = function () {
                                // Constructor
                                };

                                ....

                                if (isIE) {
                                HTMLArray = Array;
                                }
                                HTMLArray.proto type = [];
                                HTMLArray.proto type.each = function (functionCall) {


                                Which extends Array.prototype in IE with an each method, but in other
                                browsers extends a generic array object.


                                --
                                Rob

                                Comment

                                Working...