/    Sign up×
Community /Pin to ProfileBookmark

Help with menue swapping?

When ya click submit it suposed to show the changes made by a txt file, example would be in the java html box you put states Alaska and California in list 2 (Right Box) when ya click submit, I want a txt fils showing list 2, Alaska, California

Anyone know what I am doing wrong here?

Code:
<HEAD>

<SCRIPT LANGUAGE=”JavaScript”>

<!– Begin
function move(fbox, tbox) {
var arrFbox = new Array();
var arrTbox = new Array();
var arrLookup = new Array();
var i;
for (i = 0; i < tbox.options.length; i++) {
arrLookup[tbox.options[i].text] = tbox.options[i].value;
arrTbox[i] = tbox.options[i].text;
}
var fLength = 0;
var tLength = arrTbox.length;
for(i = 0; i < fbox.options.length; i++) {
arrLookup[fbox.options[i].text] = fbox.options[i].value;
if (fbox.options[i].selected && fbox.options[i].value != “”) {
arrTbox[tLength] = fbox.options[i].text;
tLength++;
}
else {
arrFbox[fLength] = fbox.options[i].text;
fLength++;
}
}
arrFbox.sort();
arrTbox.sort();
fbox.length = 0;
tbox.length = 0;
var c;
for(c = 0; c < arrFbox.length; c++) {
var no = new Option();
no.value = arrLookup[arrFbox[c]];
no.text = arrFbox[c];
fbox[c] = no;
}
for(c = 0; c < arrTbox.length; c++) {
var no = new Option();
no.value = arrLookup[arrTbox[c]];
no.text = arrTbox[c];
tbox[c] = no;
}
}
// End –>
</script>
<SCRIPT language=JavaScript>

<!– Begin
function Start(page) {
OpenWin = this.open(page, “CtrlWindow”, “toolbar=yes,menubar=yes,location=yes,scrollbars=yes,resizable=yes”);
}
// End –>
</SCRIPT>

<FORM action=/cgi-bin/script_library/form_handler_file method=post>
</HEAD>

<BODY>

<form name=”combo_box”>
<table><tr><td>
<select multiple size=”10″ name=”list1″ style=”width:150″>
<option value=”1″>Alabama</option>
<option value=”2″>Alaska</option>
<option value=”3″>Arizona</option>
<option value=”4″>Arkansas</option>
<option value=”5″>California</option>
<option value=”6″>Colorado</option>
<option value=”7″>Connecticut</option>
<option value=”8″>Delaware</option>
<option value=”9″>District of Columbia</option>

</select>
</td>
<td align=”center” valign=”middle”>
<input type=”button” onClick=”move(this.form.list2,this.form.list1)” value=”<<“>
<input type=”button” onClick=”move(this.form.list1,this.form.list2)” value=”>>”>
</td>
<td>
<select multiple size=”10″ name=”list2″ style=”width:150″>
</select>
</td></tr></table>
<INPUT type=hidden
value=http://www.angelfire.com/empire/wwffl/Test2/testchanges.txt
name=end_display>
<INPUT type=hidden
value=selected name=combo_box>
<INPUT type=hidden value=/Test2/testchanges.txt name=savefile> <INPUT onclick=”Start(‘http://www.angelfire.com/empire/wwffl/Test2/testchanges.txt‘)” type=submit value=Submit></FORM></P></FORM>&nbsp;

<P></P></BODY></HTML>

<!– Script Size: 4.75 KB –>

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@ExuroJul 10.2004 — This looks more like a problem with your CGI, not your JavaScript...
×

Success!

Help @SA_Heat spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.20,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...