Reloading a page when selection made in select box

by "Derek Lavine" <derek(at)realware.com.au>

 Date:  Fri, 16 Jun 2000 08:42:31 +1000
 To:  "HWG Languages" <hwg-languages(at)hwg.org>
  todo: View Thread, Original
Hi,

I have a java script function

function companyChanged(field)
{
 window.location='/customer/customer_add.cfm?f_companyId=' + field.value;
}


And in  the HTML I have a select widget

<select name="f_companyId" size=1 onChange="companyChanged(this)">
<option value="0">None
<option value="1">Abc
<option value="2">Xyz

etc.

In IE all works fine. Namely when I select a new option in the select list
the companyChanged function gets called and I reload the page as per the new
window.location value. I then check the url parameter f_companyId to do what
I need to do.

In netscape the field.value always comes to be null and not the number
associated with the selection made.

Yet if I change companyChanged(field) to look like this

function companyChanged(field)
{
    alert(field)
}

Netscape correctly identifies field as being the select object.

Has anyone any ideas.

Thanks in advance

Derek

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA