Quantcast
Channel: Internet Explorer Web Development forum
Viewing all articles
Browse latest Browse all 3527

a file that copies a ini file after drop down choice

$
0
0

Hi,

I'm new to this forum , and I'm hoping to get some help for this script I'm doing for work. I have this form that allows me to select drop down values. What I'm looking for is to embed the function to copy a file to a specific location. Currently it's working, but I have it run a .bat file to copy to the destination. I'd like to have it all in one file.

Any help is appreciated.

so here's what I have:


<html>


 <body SCROLL="no"  onload="moveTo(0,0); resizeTo(560,285);">

<form name="isc">
 <table border="0" cellspacing="0" cellpadding="0">
 <tr align="center">
 <td nowrap height="11"> &nbsp;

<select name="example" size="1" onChange="redirect(this.options.selectedIndex)">
 <option selected>Select a choice .</option>
 <option>North</option>
 <option>South</option>
 <option>  </option>

</select>

<select name="stage2" size="1" onChange="redirect1(this.options.selectedIndex)">
 <option value=" " selected> </option>
 <option value=" " selected>---Select2--------------</option>

</select>

<select name="stage3" size="1" onChange="redirect2(this.options.selectedIndex)">
 <option value=" " selected>---Select3----------------</option>

</select>


 <input type="button" name="Go" value="Go" onclick="window.location=stage3.options

[stage3.options.selectedIndex].value;" style="font-family:Arial;Z-INDEX: 105; POSITION: absolute;

TOP: 20px" enable>

<script>
 <!--37

var groups=document.isc.example.options.length
 var group=new Array(groups)
 for (i=0; i<groups; i++)
 group[i]=new Array()

group[0][0]=new Option("---Select2---"," ");


 /*
 This is the
 */

group[1][0]=new Option("Select Dept."," ");
 group[1][1]=new Option("15 Line","47");
 group[1][2]=new Option("TS","46");
 group[1][3]=new Option(" ","45");


 /*
 This is the
 */

group[2][0]=new Option("Select a Dept. "," ");
 group[2][1]=new Option("S A","115");
 group[2][2]=new Option("S B","116");
 group[2][3]=new Option("S C","117");
 group[2][4]=new Option("S H","118");
 group[2][5]=new Option("S H Sub","119");

var temp=document.isc.stage2


 function redirect(x){
 for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
 for (i=0;i<group[x].length;i++){
 temp.options[i]=new Option(group[x][i].text,group[x][i].value)
 }
 temp.options[0].selected=true
 redirect1(0)
 }

 

var secondGroups=document.isc.stage2.options.length
 var secondGroup=new Array(groups)
 for (i=0; i<groups; i++) {
 secondGroup[i]=new Array(group[i].length)
 for (j=0; j<group[i].length; j++) {
 secondGroup[i][j]=new Array() }}


 /*
 This is the
 */

secondGroup[0][0][0]=new Option("---Select 3---"," ");
 secondGroup[1][0][0]=new Option("---Select 3---"," ");
 secondGroup[1][1][0]=new Option("Now Select a Station"," ");
 secondGroup[1][1][1]=new Option("A 15_HS_STA75","15_HS_STA75.bat");
 secondGroup[1][1][2]=new Option("A 15_STA_65","15_STA_65.bat");

 

/*
 This is the
 */

secondGroup[1][2][0]=new Option("Now Select a Station"," ");
 secondGroup[1][2][1]=new Option(" BUL","TS_BUL.bat");
 secondGroup[1][2][2]=new Option("C T_T8","TS_CT_T8.bat");

 

/*
 This is the
 */

secondGroup[1][3][0]=new Option("Now Select a Dept."," ");
 secondGroup[1][3][1]=new Option("1","1");
 secondGroup[1][3][2]=new Option("2","2");


 /*
 This is the
 */

secondGroup[2][0][0]=new Option("---Select 3---"," ");
 secondGroup[2][1][0]=new Option("Now Select a Dept."," ");
 secondGroup[2][1][1]=new Option("A_H TEST","S_A_H TEST.bat");
 secondGroup[2][1][2]=new Option("A_STA_220","S_A_STA_220.bat");

 


 /*
 This is t
 */

secondGroup[2][2][0]=new Option("Now Select A Station"," ");
secondGroup[2][2][1]=new Option("S_Blk_STA_35-B1710","S_Blk_STA_35.bat");
secondGroup[2][2][2]=new Option("S_Blk_STA_60-S2050","S_Blk_STA_60.bat");

 


 /*
 This is the
 */

secondGroup[2][3][0]=new Option("Now Select A Station"," ");
 secondGroup[2][3][1]=new Option("B Desk-C107","S_Crk_ BUL Desk.bat");
 secondGroup[2][3][2]=new Option("STA_60_TLDESK","S_Crk_STA_60_TLDESK.bat");


 /*
 This is the
 */

secondGroup[2][4][0]=new Option("Now Select A Station"," ");
 secondGroup[2][4][1]=new Option("H-A BUL Sta-C147","S_Hd_A_BUL Sta.bat");
 secondGroup[2][4][2]=new Option("H_A STA_77A-HA1001","S_H_A_STA_77A.bat");

 

/*

 */

secondGroup[2][5][0]=new Option("Now Select A Station"," ");
 secondGroup[2][5][1]=new Option("HS_STA_300-S300R","S_HS_STA_300.bat");
 secondGroup[2][5][2]=new Option("HS_STA_345-S345","South_HS_STA_345.bat");
 secondGroup[2][5][3]=new Option("Test","copy.hta");

var temp1=document.isc.stage3
 function redirect1(y){
 for (m=temp1.options.length-1;m>0;m--)
temp1.options[m]=null
 for (i=0;i<secondGroup[document.isc.example.options.selectedIndex][y].length;i++){
 temp1.options[i]=new Option(secondGroup[document.isc.example.options.selectedIndex][y]

[i].text,secondGroup[document.isc.example.options.selectedIndex][y][i].value)
 }
 temp1.options[0].selected=true
 }

function redirect2(z){
 window.location=temp1[z].value
 }

//-->
 </script>

</td>
 </tr>

</table>

 </form>

</body>

</html>

 


Viewing all articles
Browse latest Browse all 3527

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>