Javascript and constructing a URL

I have the following code in the onchange event of a staff number field

window.location.replace(“/folder/database.nsf/FormName?OpenForm&cust_staffno” + frm.Cust_StaffNo.value +“statusproduct” + frm.Status_Product.options(frm.Status_Product.selectedindex).text + “statusstatus” + frm.Status_Status.options(frm.Status_Status.selectedindex).text “end”);

I also have an alert before this code to find out what the value of the filed is.

alert(“statusproduct” + frm.Status_Product.options(frm.Status_Product.selectedindex).text);

The field Status_Product is a dialog list constructed from a DbLookup

The alert only shows the first item in the list deespite the actual field value being one othe the other items in the list.

The result of this is that my field

querySP

with a formula

@Middle(QUERY_STRING; “statusproduct” ; “statusstatus”)

does not pick up the current value.

Can anyboy help me with this

Thanks in advance

Tricia Churchman

Subject: Javascript and constructing a URL

Hi Tricia

“selectedindex” be with a capital “I” as in "“selectedIndex”.

Let’s see if this the problem.

Good luck

Bizhan

Subject: RE: Javascript and constructing a URL

Hi Bizhan

Thanks for that. I had printed out some code and did not spot the I was acapital. It works fine now.

Thanks Again

Tricia