Firefox not evaluating a script

M

mike

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.
 
D

David Dorward

mike said:
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)
 
K

kay

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=""
 
K

kay

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=""
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top