Click to See Complete Forum and Search --> : Dynavically Create URL


jason
12-09-2002, 06:22 PM
I am trying to do use a location.href, and dynamically append a url variable to the url (see code below).

The problem I am having is that the code I am using is resulting in the href being only the value of the variable I am appending, and not prepending the string I have specified.

Can anyone see what I am doing wrong?

Thaks in advance.

THE CODE--

function idown(){
location.href('index.cfm?report=name&parent=' && document.all.FormName.SelectName[document.all.FormName.SelectName.selectedIndex].value);
return true;
}

gil davis
12-09-2002, 07:01 PM
You probably want to use "+" to concatenate the strings.