// included javascript file in form 1

function getBrand(form){

var listobj = form.lstBrand
var selIndex = form.lstBrand.selectedIndex
var brandcode = listobj.options[selIndex].value
var brandname = listobj.options[selIndex].text
form.BrandCode.value = brandcode
form.BrandName.value = brandname
form.target = '_self'
form.action = 'BrandStatistics.asp'
form.submit()
}




// form declaration

<form name="frmBrand" method="post" action="" ID="frmBrand">


FORM 1 invokes getbrand

<select name="lstBrand" size="1" onChange="getBrand(this.frmBrand);" ID="lstBrand">

** This works on IE but not netscape

If I change it to
<select name="lstBrand" size="1" onChange="getBrand(this.form);" ID="lstBrand">

** This works on netscape but not ID


I need a generic way to either pass the form that will work in IE and netscape or away
to access the form in the javascript

I tried to redo and not pass the form but I did not get this to work

function getBrand(){

var listobj = document.form.lstBrand
var selIndex = form.lstBrand.selectedIndex
var brandcode = listobj.options[selIndex].value
var brandname = listobj.options[selIndex].text
document.form.BrandCode.value = brandcode
document.form.BrandName.value = brandname
document.form.target = '_self'
document.form.action = 'BrandStatistics.asp'
document.form.submit()
}