B
Beemer Biker
I cant seem to change the values in my drop down box.
There are 3 items each has an associated value
name value
----------- -----------
MyDocuments "my documents"
Desktop "my desktop"
temp "c:\temp"
function SetWorkingList()
{
var SelectDestination
SelectDestination =document.getElementsByName('destination_select')
alert(SelectDestination[0].value) // this shows "my_documents" if
"MyDocuments" is selected
SelectDestination[0].value = "hi there"
}
I thought that [0] was the first item, [1] the second and [2] the third. I
thought wrong. Even if there are 3 items in the drop down box, the actual
length of SelectDestination is only 1 so [1] and [2] fail big time when I
try to subscript SelectDestination.
I cannot set the value "hi there". So how do I change the values on the
fly?
Eventually, when the form loads I want to fill in the values with the actual
desktop and my document paths. I know how to get those paths, but I cant
seem to figure out how to subscript into the dropdown box.
Looking at the code, I see functions such as FP_getObjectByID(id,n) Not
sure where that came from, FP2003 must have thought I needed it. Maybe
there is an FP_getObjectByNAME where I can get the drop-down box object and
fondle it all I want?
--
=======================================================================
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=======================================================================
There are 3 items each has an associated value
name value
----------- -----------
MyDocuments "my documents"
Desktop "my desktop"
temp "c:\temp"
function SetWorkingList()
{
var SelectDestination
SelectDestination =document.getElementsByName('destination_select')
alert(SelectDestination[0].value) // this shows "my_documents" if
"MyDocuments" is selected
SelectDestination[0].value = "hi there"
}
I thought that [0] was the first item, [1] the second and [2] the third. I
thought wrong. Even if there are 3 items in the drop down box, the actual
length of SelectDestination is only 1 so [1] and [2] fail big time when I
try to subscript SelectDestination.
I cannot set the value "hi there". So how do I change the values on the
fly?
Eventually, when the form loads I want to fill in the values with the actual
desktop and my document paths. I know how to get those paths, but I cant
seem to figure out how to subscript into the dropdown box.
Looking at the code, I see functions such as FP_getObjectByID(id,n) Not
sure where that came from, FP2003 must have thought I needed it. Maybe
there is an FP_getObjectByNAME where I can get the drop-down box object and
fondle it all I want?
--
=======================================================================
Beemer Biker joestateson at grandecom dot net
http://TipsForTheComputingImpaired.com
http://ResearchRiders.org Ask about my 99'R1100RT
=======================================================================