Results 1 to 3 of 3

Thread: Hey Javascript

  1. #1

    Thread Starter
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Hey Javascript

    I love javascript.

    Forget the fact that it's a case sensitive language, causing me to lose time in trivial things like readonly and readOnly, but here's something new for me!

    Even though I've named my form as

    <form name="form1">

    I still have to refer to it as

    document.Form1....


    Wonderful isn't it? Try your best to stay case-sensitive to avoid the errors, only to be told that you're a monkey-eared bugger who can't do anything right if "right" came and kicked you in the testicular region.

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Your fault, really. What you should do is give the form an id:
    <form id="form1">
    and use the DOM to access it:
    document.getElementById('form1');

    Though I really don't get why your method should require change of case, I can't remember ever having heard that before.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994
    Originally posted by CornedBee
    Your fault, really. What you should do is give the form an id:
    <form id="form1">
    and use the DOM to access it:
    document.getElementById('form1');

    Though I really don't get why your method should require change of case, I can't remember ever having heard that before.
    Yeah, always use the ID tag when working with JS, it also helps you not to get confused with what you actually used...
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width