syntax question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tom Orle

    syntax question

    Hi all,
    Although I am a developer - I never coded in javascript.

    Now, here I am trying to order a laptop from the Dell online shop but
    everytime I try to press 'continue' after picking the options, I get
    an error message in the lower left hand corner of the browser.
    I'm using WIN 98SE with java enabled on my laptop.

    The error log says:
    Line: 1
    Char: 1
    error: object expected
    code: 0

    And this is the line which pops up when I place the cursor on the
    'continue' button causing the above error:

    javascript:next _page('1','c=us &cs=19&kc=6V602 &l=en&oc=5100FS &s=dhs');

    I would assume there's a bug in that line. Although there's little I
    can do about it other than forward it to the Dell folks - my pgming
    background has me curious as to what's causing this!
    Perhaps I have some settings set wrong on my laptop.

    Thanks ....

    Aren't 'puters fun?;-))

    -=tom=-

  • Richard Cornford

    #2
    Re: syntax question

    "Tom Orle" <xspam.orle@att .net> wrote in message
    news:2lqi001o13 ttj13ki8feufga2 dku0piur4@4ax.c om...[color=blue]
    >Now, here I am trying to order a laptop from the Dell online
    >shop but everytime I try to press 'continue' after picking the
    >options, I get an error message in the lower left hand corner
    >of the browser. I'm using WIN 98SE with java enabled on my laptop.
    >
    > The error log says:
    > Line: 1
    > Char: 1
    > error: object expected
    > code: 0[/color]

    That error message usually relates to event handling code. Mozilla and
    Opera both generate better (more informative (usually)) error messages
    than IE (in their JavaScript consoles).
    [color=blue]
    >And this is the line which pops up when I place the cursor
    >on the 'continue' button causing the above error:
    >
    >javascript:nex t_page('1','c=u s&cs=19&kc=6V60 2&l=en&oc=5100F S&s=dhs');[/color]

    It is a pity that you have omitted the HTML context so that we cannot
    tell whether this is an HREF abuse or an onclick handler. It is probably
    the latter, in which the "javascript :" prefix is usually
    unnecessary/meaningless (but also harmless).

    The only object that is referred to is the - next_page -function, so
    that identifier cannot be resolved. That should not happen and certainly
    should have shown up in QA testing.

    Interestingly, this code represents Dell making their online purchasing
    needlessly dependent on JavaScript, I wonder how much this decision is
    costing them in lost business even without the code being erroneous.

    It is unfortunately the case that there is a (mistaken) attitude that
    any fool can write JavaScript, which manifests itself in fools often
    being given the task of writing JavaScript. This fool is costing Dell
    more than they are loosing due to their decision to make purchases
    needlessly dependent on JavaScript(assu ming it actually was a decision
    rather than just another consequence of assigning the task to someone
    who knew no better).
    [color=blue]
    >I would assume there's a bug in that line. Although there's
    >little I can do about it other than forward it to the Dell
    >folks - my pgming background has me curious as to what's
    >causing this![/color]

    The failure to resolve the identifier as a reference to a function
    implies that the error is elsewhere, but if the function code is missing
    then there is not much that can be doe about it. If the function
    reference is being overwritten, or the function definition is in some
    way incorrect then there may be some remedial action that you could take
    (at least if you knew JavaScript/HTML well enough).

    Perhaps I have some settings set wrong on my laptop.

    No, you have done nothing wrong. The fault is entirely with Dell, and
    you should maybe ask yourself whether it is a good idea to be doing
    computer related business with a company that cannot even implement a
    web purchasing system properly, there is no shortage of competition in
    the computer retailing world.

    Richard.


    Comment

    • Randy Webb

      #3
      Re: syntax question

      Richard Cornford wrote:[color=blue]
      > "Tom Orle" <xspam.orle@att .net> wrote in message
      > news:2lqi001o13 ttj13ki8feufga2 dku0piur4@4ax.c om...[/color]

      <--snip-->
      [color=blue]
      >[color=green]
      >>And this is the line which pops up when I place the cursor
      >>on the 'continue' button causing the above error:
      >>
      >>javascript:ne xt_page('1','c= us&cs=19&kc=6V6 02&l=en&oc=5100 FS&s=dhs');[/color]
      >
      >
      > It is a pity that you have omitted the HTML context so that we cannot
      > tell whether this is an HREF abuse or an onclick handler. It is probably
      > the latter, in which the "javascript :" prefix is usually
      > unnecessary/meaningless (but also harmless).[/color]

      What browsers display the onclick handler upon mouseover? 99.99% of the
      time, if it shows that in the status bar (or a tooltip), it is generally
      a sign of this:

      <a href="javascrip t:.......">



      --
      Randy

      Comment

      • Richard Cornford

        #4
        Re: syntax question

        "Randy Webb" <hikksnotathome @aol.com> wrote in message
        news:qPednatra7 TJyZfd4p2dnA@co mcast.com...
        <snip>[color=blue]
        >What browsers display the onclick handler upon mouseover? 99.99% of
        >the time, if it shows that in the status bar (or a tooltip), it is
        >generally a sign of this:
        >
        > <a href="javascrip t:.......">[/color]

        Good point! Its HREF abuse, though the error report sounded more like an
        event handler. Though I don't see error reports from javascript: pseudo
        protocol code often because I never use them ;-)

        Richard.


        Comment

        • Tom Orle

          #5
          Re: syntax question

          "Richard Cornford" <Richard@litote s.demon.co.uk> wrote:
          [color=blue]
          >It is a pity that you have omitted the HTML context so that we cannot
          >tell whether this is an HREF abuse or an onclick handler.[/color]

          Richard,
          That's because it's a large piece of code ;-))
          (won't fit in the notebook!)
          Here's the line that contains the probllem line:

          ....<a name="bottom_an chor"></a></td><td width=10>&nbsp; </td>
          <td width=125><a
          href="javascrip t:next_page('1' ,'c=us&cs=19&kc =6V603&l=en&oc= 5150FS&s=dhs'); "
          class="lnk"><im g
          src="http://img.dell.com/img.aspx?p=cnvE Y3QAxpmMra5pPAK eMiksUgDeqQR3YL Pndy9bnjR9ajxW1 LVMblr%2frCZ7Vp cpNHVNYdSpXUtd5 KImew3M"
          border="0" vspace="4" alt="Continue"> </a> ....

          -=tom=-


          Comment

          • Hywel Jenkins

            #6
            Re: syntax question

            In article <2lqi001o13ttj1 3ki8feufga2dku0 piur4@4ax.com>,
            xspam.orle@att. net says...[color=blue]
            > Hi all,
            > Although I am a developer - I never coded in javascript.
            >
            > Now, here I am trying to order a laptop from the Dell online shop but
            > everytime I try to press 'continue' after picking the options, I get
            > an error message in the lower left hand corner of the browser.
            > I'm using WIN 98SE with java enabled on my laptop.
            >
            > The error log says:
            > Line: 1
            > Char: 1
            > error: object expected
            > code: 0
            >
            > And this is the line which pops up when I place the cursor on the
            > 'continue' button causing the above error:
            >
            > javascript:next _page('1','c=us &cs=19&kc=6V602 &l=en&oc=5100FS &s=dhs');
            >
            > I would assume there's a bug in that line. Although there's little I
            > can do about it other than forward it to the Dell folks - my pgming
            > background has me curious as to what's causing this!
            > Perhaps I have some settings set wrong on my laptop.[/color]

            URL? It could be that the JS isn't loading properly and the next_page()
            functions doesn't exist.

            --
            Hywel I do not eat quiche


            Comment

            • Randy Webb

              #7
              Re: syntax question

              Tom Orle wrote:[color=blue]
              > "Richard Cornford" <Richard@litote s.demon.co.uk> wrote:
              >
              >[color=green]
              >>It is a pity that you have omitted the HTML context so that we cannot
              >>tell whether this is an HREF abuse or an onclick handler.[/color]
              >
              >
              > Richard,
              > That's because it's a large piece of code ;-))
              > (won't fit in the notebook!)
              > Here's the line that contains the probllem line:
              >[/color]
              [color=blue]
              > href="javascrip t:next_page('1' ,'c=us&cs=19&kc =6V603&l=en&oc= 5150FS&s=dhs'); "[/color]

              Richard?? <g>

              --
              Randy

              Comment

              • .

                #8
                Re: syntax question

                Nor am i, but

                javascript:next _page('1'...... ......

                surely there's something wrong with the previous line

                ctr

                "Hywel Jenkins" <hyweljenkins@h otmail.com> wrote in message
                news:MPG.1a74dd 2db3adc9c698998 5@news.individu al.net...[color=blue]
                > In article <2lqi001o13ttj1 3ki8feufga2dku0 piur4@4ax.com>,
                > xspam.orle@att. net says...[color=green]
                > > Hi all,
                > > Although I am a developer - I never coded in javascript.
                > >
                > > Now, here I am trying to order a laptop from the Dell online shop but
                > > everytime I try to press 'continue' after picking the options, I get
                > > an error message in the lower left hand corner of the browser.
                > > I'm using WIN 98SE with java enabled on my laptop.
                > >
                > > The error log says:
                > > Line: 1
                > > Char: 1
                > > error: object expected
                > > code: 0
                > >
                > > And this is the line which pops up when I place the cursor on the
                > > 'continue' button causing the above error:
                > >
                > > javascript:next _page('1','c=us &cs=19&kc=6V602 &l=en&oc=5100FS &s=dhs');
                > >
                > > I would assume there's a bug in that line. Although there's little I
                > > can do about it other than forward it to the Dell folks - my pgming
                > > background has me curious as to what's causing this!
                > > Perhaps I have some settings set wrong on my laptop.[/color]
                >
                > URL? It could be that the JS isn't loading properly and the next_page()
                > functions doesn't exist.
                >
                > --
                > Hywel I do not eat quiche
                > http://hyweljenkins.co.uk/
                > http://hyweljenkins.co.uk/mfaq.php[/color]


                Comment

                • Hywel Jenkins

                  #9
                  Re: syntax question

                  In article <UNDOb.326$7r2. 84@newsfep3-gui.server.ntli .net>,
                  news@proscan.de mon.co.uk says...[color=blue]
                  > "Hywel Jenkins" <hyweljenkins@h otmail.com> wrote in message
                  > news:MPG.1a74dd 2db3adc9c698998 5@news.individu al.net...[color=green]
                  > > In article <2lqi001o13ttj1 3ki8feufga2dku0 piur4@4ax.com>,
                  > > xspam.orle@att. net says...[color=darkred]
                  > > > Hi all,
                  > > > Although I am a developer - I never coded in javascript.
                  > > >
                  > > > Now, here I am trying to order a laptop from the Dell online shop but
                  > > > everytime I try to press 'continue' after picking the options, I get
                  > > > an error message in the lower left hand corner of the browser.
                  > > > I'm using WIN 98SE with java enabled on my laptop.
                  > > >
                  > > > The error log says:
                  > > > Line: 1
                  > > > Char: 1
                  > > > error: object expected
                  > > > code: 0
                  > > >
                  > > > And this is the line which pops up when I place the cursor on the
                  > > > 'continue' button causing the above error:
                  > > >
                  > > > javascript:next _page('1','c=us &cs=19&kc=6V602 &l=en&oc=5100FS &s=dhs');
                  > > >
                  > > > I would assume there's a bug in that line. Although there's little I
                  > > > can do about it other than forward it to the Dell folks - my pgming
                  > > > background has me curious as to what's causing this!
                  > > > Perhaps I have some settings set wrong on my laptop.[/color]
                  > >
                  > > URL? It could be that the JS isn't loading properly and the next_page()
                  > > functions doesn't exist.[/color][/color]
                  [color=blue]
                  > Nor am i, but
                  >
                  > javascript:next _page('1'...... ......
                  >
                  > surely there's something wrong with the previous line[/color]

                  I don't know why you're replying to me, but there is no previous line -
                  this code is in the href of a link.

                  --
                  Hywel I do not eat quiche


                  Comment

                  Working...