Loading ...
Sorry, an error occurred while loading the content.

Re: checkboxes and variables

Expand Messages
  • Jon Stephens
    ... Exactly what I said: Claiming that document.formName.elementName syntax works only in MSIE is not true. AFAIK, it works in every JS-capable browser there
    Message 1 of 12 , Mar 30, 2007
    • 0 Attachment
      > Re: checkboxes and variables Posted by: "Bocah Sableng"
      > cahsableng@... yoekriz Date: Wed Mar 28, 2007 10:42 am ((PDT))
      > On 3/28/07, Jon Stephens <jon@...> wrote:
      >>>> check the attribute 'checked' of each checkbox before add its
      >>>> value. document.form.base1 works on IE only,
      >>>
      >>> Assuming that you actually meant "document.form1.base1", this is
      >>> simply not true.
      >>>
      >
      > Thanks for your comment, but I still don't know the meaning of "this
      > is simply not true". Can you explain more?

      Exactly what I said: Claiming that document.formName.elementName syntax
      works only in MSIE is not true. AFAIK, it works in every JS-capable
      browser there is, all the way back to Netscape 2.

      > I hope you have something to say to fix my coding habit. I need
      > suggestion from 10-year veteran. ;-)
      >
      >>>> for compatibility, use:
      >>>> document.forms['form1'].elements['base1'] code below tested on
      >>>> FF1.5 and IE6.
      >>>
      >>> [...]
      >>>
      >
      > Yeah, I know those browsers are both ancient. But my computer I work
      > with is relatively slow. I can't understand your
      > "braces-and-three-dots" means. Maybe you have any idea how to test
      > javascript codes?

      Your syntax isn't *wrong*, but it's not required for compatibility,
      either. Perhaps you're thinking of accessing elements using their IDs as
      global objects, which *is* specific to MSIE?

      ... = ellipsis, used to indicate that something's been omitted. In this
      case, I used it to indicate that I didn't quote the remainder of your text.

      cheers

      j.


      --
      This message has not been scanned for viruses.

      Since I do not use a Microsoft operating
      system or software, and use only plaintext
      for email, there is little need for me to do so.
    • Bocah Sableng
      ... Thanks for your response. I had written some codes using document.formName.elementName a few month ago. Recently, I had tested them on FF and some of them
      Message 2 of 12 , Apr 1 7:13 PM
      • 0 Attachment
        On 30 Mar 2007 15:45:13 -0700, Jon Stephens <jon@...> wrote:

        > Exactly what I said: Claiming that document.formName.elementName syntax
        > works only in MSIE is not true. AFAIK, it works in every JS-capable
        > browser there is, all the way back to Netscape 2.
        >
        Thanks for your response.
        I had written some codes using document.formName.elementName a few
        month ago. Recently, I had tested them on FF and some of them are not
        working properly. Now I force to use square bracket notation to access
        named elements.

        > Your syntax isn't *wrong*, but it's not required for compatibility,
        > either. Perhaps you're thinking of accessing elements using their IDs as
        > global objects, which *is* specific to MSIE?
        >
        Close to it. I was thinking accessing element using their names as
        global objects, which *is* specific to MSIE.

        > ... = ellipsis, used to indicate that something's been omitted. In this
        > case, I used it to indicate that I didn't quote the remainder of your text.
        >
        Nice. I will add it to my english vocab. Thanks.
        Sorry, about my misinterpretation about it.

        P.S: I hope this thread ended. It goes far beyond the original topic
        and no further response from the OP.
      Your message has been successfully submitted and would be delivered to recipients shortly.