|
Posted by Ayush on 12/29/06 20:43
Replied to [Highlander]s message :
> Hello all. Consider the following HTA:
>
> <html>
> <head>
> <title>Date Pulldowns</title>
> <HTA:APPLICATION
> ID="HTAUI"
> APPLICATIONNAME="Date Pulldowns"
> SCROLL="no"
> SINGLEINSTANCE="yes"
> WINDOWSTATE="maximized">
> </head>
I am not very good at VBs so i made this in Js. Insert this at top of your VBS script
tag :
There is a variable named elementNames.. The syntax is like :
"ID of element|LengthAndValueOptions,ID|LengthAndValue etc.etc...
<script language="JScript">
window.onload=Makee
elementNames="FromDaySelection|31,FromMonthSelection|12,ToMonthSelection|12,ToDaySelection|31"
function Makee(){
eN=elementNames.split(",");numm=new Array()
for(indX=0;indX<eN.length;indX++){
numm[indX]=parseInt(eN[indX].substring(eN[indX].length-2,eN[indX].length))
eN[indX]=document.getElementById(eN[indX].substring(0,eN[indX].length-3));
}
for(aIx=0;aIx<eN.length;aIx++){
con = document.createElement("option");
eN[aIx].options.add(con);
for(aIxx=1;aIxx<(numm[aIx]+1);aIxx++){
cTion = document.createElement("option");
eN[aIx].options.add(cTion);
cTion.innerText = aIxx;
cTion.value = aIxx;
}}}
</script>
Navigation:
[Reply to this message]
|