Hopefully somebody here can offer a little guidance.
What i’m trying to achieve:
Then use an “onchange” routine to find the selected item in the combo and just do a simple
for (var x in SELECTEDHASHNAME). Unfortunately due to the combo box storing the selection as a string I can’t simply refer to it in the above statement by name. I’m guessing it has to be converted from string to an object reference. Although I could be way of the mark with this thought?
So back to the question...
Can you use a combo box to refer to the name of a hash that you can then interrogate with a "for x in hash" stile statement?
Hopefully somebody here will understand my ramblings and have a suggestion.
Thanks to one and all for any help they maybe able to offer.
Ps. I have attached some sample code that shows what I want to do. If you substitute the “i" for “Mon” it will work.
Likewise I’d want to be able to substitute the Mon[s] for i[s] to make it truly dynamic.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
var Sun = new Object();
var Mon = new Object();
for (var s in i) //replace i with Var Mon and it works ...pesky thing grr
alert('Key=' + s);
document.all[s].innerText = Mon[s] ; //would also need to change Mon to 'i' here
<body bgcolor="#FFFFFF" text="#000000">
<form name="form1" method="post" action="">
<select id = "dayid" name="days" onchange="changedata();">
<option value="Sun" selected>Sun</option>
<p id=User>Select an option from the combo box above</p>