Firefox not evaluating a script

Discussion in 'Javascript' started by mike, Feb 24, 2006.

  1. mike

    mike Guest

    I am using the following script for a function to evaluate a string of
    data.

    <script type="text/JavaScript">
    function buform1_changed() {

    buform1.item_name.value=buform1.items.value.substring(13,buform1.items.value.length)
    buform1.amount.value=buform1.items.value.substring(6,11)
    buform1.item_number.value=buform1.items.value.substring(0,6)}
    </script>

    This is in my header and in the body I do have a form called buform1
    It is working just fine in IE. However in Firefox it does not.
    Javascript Console says that buform1 is not defined. Because it is not
    defined the function will not run.

    Any thoughts on why or what I need to do?
    Thanks.
     
    mike, Feb 24, 2006
    #1
    1. Advertising

  2. mike wrote:

    > buform1.amount.value=buform1.items.value.substring(6,11)
    > This is in my header and in the body I do have a form called buform1
    > It is working just fine in IE. However in Firefox it does not.


    Quote:

    The following form related properties (originally from Internet Explorer)
    are not supported in the W3C Document Object Model:

    * FormName.InputName.value

    -- http://www.mozilla.org/docs/web-developer/upgrade_2.html#dom

    (That document also explains the standard ways to access form controls)

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
     
    David Dorward, Feb 24, 2006
    #2
    1. Advertising

  3. mike

    kay Guest

    not supported in DOM, but FF supports this particular way to acces
    input's value, so its not the cause of the problem...

    try accesing it like this

    document.forms["buforml"].elements["item_number"].value=""
     
    kay, Feb 25, 2006
    #3
  4. mike

    kay Guest

    not supported in DOM, but FF supports this particular way to acces
    input's value, so its not the cause of the problem...

    try accesing it like this

    document.forms["buforml"].elements["item_number"].value=""
     
    kay, Feb 25, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shelly
    Replies:
    8
    Views:
    591
    Michael Borgwardt
    Dec 10, 2004
  2. Ian Skinner
    Replies:
    1
    Views:
    102
  3. Torsten Mohr
    Replies:
    0
    Views:
    102
    Torsten Mohr
    Dec 17, 2003
  4. Replies:
    2
    Views:
    119
    Tintin
    May 30, 2006
  5. Replies:
    2
    Views:
    191
Loading...

Share This Page