P
pbd22
Hello. I would really appreciate some help. I am doing my
best to explain my problem and your patience is very appreciated.
thanks.
I have a page that allows users to upload multiple files at once to a
remote file server. I am creating the script to handle the client
actions and need some help.
the problem:
for each file that gets added to the upload queue, data from the
page's inputs needs to get saved in an array prior to submit. How do I
approach this?
my (current) solution:
I have a class (called MultiUpload) that gets instantiated as so:
window.addEvent('domready', function() {
new
MultiUpload( document.getElementById( 'uploadForm' ).my_file_input_element,
0, '{id}', true, true ); });
The MultiUpload class has a number of inner functions, the ones
relevant here are addRow:function() which adds a new <DIV> row for
each uploaded file. Inside of addRow is the Element declaration for a
span where the name of the file is contained:
var item = new Element(
'span',
{
'class':'item',
'events':{
'click':function(uid){
this.activeRow( uid );
}.pass( current_element.uid, this )
}
}
).setText( name );
current_element is the element that has been currently added to the
queue (of array elements[]) and uid is its order (0,1,2,3,4...).
The span is given a 'click' event with function this.activeRow called.
The function attempts to do the following:
1) the first for loop (var f) searches the form for data input fields
and adds them to the array inputs.
2) the next for loop (var i) sets the count for the number of files
currently in the upload queue. "global_cnt" is always the limit or
last added file count.
3) the last for loop (var j) sets the number of the data inputs as the
limit.
Now, when the outter loop equals the current selected file (i == uid),
I attempt to use a multidimensional array to either populate the
feilds if data has already been set:
if(fileQueue[j]){ inputs[j].value =
fileQueue[j];
or store data if the user has entered something:
inputs[j].onchange=function(){
fileQueue[j] = inputs[j].value;
}
I am currently neither getting an error from try/catch nor getting the
code to store data and repopulate fields when I click on a file link.
So, I am not quite sure where to go from here....
Below is activeRow:
activeRow:function( uid ){
try {
var frm = document.uploadForm;
var inputs = new Array();
// Discover the data elements
for (var f = 0; f < frm.elements.length; f++)
{
if (frm.elements[f].className == "input") {
inputs[inputs.length] = frm.elements[f];
}
}
var fileQueue = new Array(global_cnt);
// Sort through files selected
for (var i=0; i<=global_cnt; i++) {
// If the file was clicked
if (i == uid) {
fileQueue = new Array(inputs.length);
for (var j=0; j < inputs.length; j++)
{
if(fileQueue[j]){
inputs[j].value = fileQueue[j];
}
if (inputs[j].onChanged)
fileQueue[j] = inputs[j].value;
}
}
}
}catch(e){alert(e.message);}
},
Finally, for what it is worth, below is my form HTML. I have been
advised to add it, so, sorry in advance to the "post lightly" camp:
<form id="uploadForm" name="uploadForm" method="POST"
enctype="multipart/form-data"
action="progress.aspx"
target="uploadFrame" onsubmit="return (callToServer(this.name))"
style="padding: 10px;">
<div id="set_one" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<label style="width: 85px; text-
align: right; float: left;">
Video file:
</label>
<input id="my_file_input_element"
type="file" name="file_1" />
<div style="display: none"
id="video-file-error" class="error-text">
Required field cannot be left
blank
<br />
</div>
<br />
<label style="width: 85px; text-
align: right; float: left;">
Title:
</label>
<input class="input" name="title"
id="title" maxlength="255" type="text"
size="53"
onchange="onTitleChange();">
<br />
<div style="display: none"
id="title-error" class="error-text">
<label>
Required field cannot be
left blank</label>
<br>
</div>
<br />
<label style="width: 85px; text-
align: right; float: left;">
Description:
</label>
<textarea class="input" rows="6"
cols="40" name="description" id="description"
onchange="onDescChange();"></
textarea>
<div style="display: none"
id="description-error" class="error-text">
Required field cannot be left
blank
<br>
</div>
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
Tags:
</label>
<input name="tags" id="tags"
maxlength="255" type="text" class="input" size="53">
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
Category:
</label>
<select class="input"
id="category" name="category">
<option value="[Select
category]" selected>[Select category]</option>
<option value="Attic">Attic</
option>
<option
value="Backyard">Backyard</option>
<br>
<div style="display: none"
id="genre-error" class="error-text">
Required field cannot be left
blank
<br>
</div>
<br />
<label style="width: 85px; text-
align: right; float: left;">
Language: </label>
<select class="input"
id="language" name="language">
<option value="[Select
language]">[Select language]</option>
<option value="AB">Abkhazian </
option>
<option value="AA">Afar </
option>
<option value="AF">Afrikaans </
option>
<option value="ZU">Zulu </
option>
</select>
<br>
<div style="display: none"
id="language-error" class="error-text">
Required field cannot be left
blank
<br>
</div>
</div>
<!-- END SET ONE -->
<div id="set_two" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Access:</b>
</label>
<label>
Public by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set2', 'img2')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img2" src="../icons/btn_down.gif" style="cursor: pointer;" /></
span></span>
<div style="clear: both;">
</div>
<div id="set2" style="margin-left:
10px; display: none;">
<p>
<input class="input"
type="radio" name="public" value="public">
<label>
Public - your video
will be included in search results.
</label>
<br>
<input type="radio"
checked name="unlisted" class="input" value="unlisted">
<label>
Unlisted - your video
will <b>not</b> be included in search results.
</label>
</p>
</div>
</div>
<!-- END SET TW0 -->
<div id="set_three" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Video Location:</
b>
</label>
<label>
Public by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set3', 'img3')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img3" src="http://www.trezoro.com/icons/btn_down.gif"
style="cursor: pointer;" /></span>
</span>
<div style="clear: both;">
</div>
<div id="set3" style="display:
none;">
<p>
<label style="width: 85px;
text-align: right; float: left;">
Address: </label>
<input class="input"
type="text" size="30" name="address">
<input type="button"
onclick="javascript:showAddress(this.form.address.value, 14); return
false;" value="" />
<br />
<br />
<label style="width: 85px;
text-align: right; float: left;">
Location: </
label>
<input type="text"
id="coords" name="coords" size="53" class="input" style="border-
style:none; color:Black; background-color:Transparent;" />
<br />
<br />
</p>
</div>
</div>
<!-- END SET THREE -->
<div id="set_four" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Privacy:</b>
</label>
<label>
Public by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set4', 'img4')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img4" src="../icons/btn_down.gif" style="cursor: pointer;" /></
span>
</span>
<div style="clear: both;">
</div>
<div id="set4" style="margin-left:
10px; display: none;">
<p>
<span style="float:
left;">
<label style="float:
left; margin-left: 10px;">
<b>Comments:</b></
label>
<span style="float:
right; margin-right: 10px; width: 275px;">
<input
type="radio" checked name="comments" class="input">
<label
style="width: 100px;">
Allow all
comments without approval.</label>
<br />
<input
type="radio" name="comments" class="strangers">
<label
style="width: 100px;">
I must approve
comments from strangers.</label>
<br />
<input
type="radio" name="comments" class="input">
<label
style="width: 100px;">
I must approve
all comments.</label>
<br />
<input
type="radio" name="comments" class="input">
<label
style="width: 100px;">
Disable all
comments on this video.</label>
<br />
</span></span><span
style="float: left; margin-top: 10px;">
<label
style="float: left; margin-left: 10px;">
<b>Ratings:</
b></label>
<span
style="float: right; margin-right: 10px; width: 275px;">
<input
type="radio" checked name="ratings" class="input">
<label
style="width: 100px;">
Allow
users to rate this video.</label>
<br />
<input
type="radio" name="ratings" class="input">
<label
style="width: 100px;">
Disable
ratings on this video.</label>
<br />
</span></
span><span style="float: left; margin-top: 10px;">
<label
style="float: left; margin-left: 10px;">
<b>Embedding:</b></label>
<span
style="float: right; margin-right: 10px; width: 275px;">
<input
type="radio" checked name="embedding" class="input">
<label
style="width: 100px;">
Allow
anybody to show this video.</label>
<br />
<input
type="radio" name="embedding" class="input">
<label
style="width: 100px;">
Keep
the video on this site only.</label>
<br />
</span></span>
</p>
</div>
<div style="clear: both;">
</div>
</div>
<div id="set_five" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Date and Time:</
b>
</label>
<label>
Today by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set5', 'img5')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img5" src="../icons/btn_down.gif" style="cursor: pointer;" /></
span></span>
<div style="clear: both;">
</div>
<div id="set5" style="margin-left:
10px; display: none;">
<p>
<label style="width: 85px;
text-align: right; float: left;">
Date:
</label>
<select id="recorded_mo"
name="recorded_mo" class="input">
<option value="0">---</option>
<option value="1">January</
option>
<option value="2">Feburary</
option>
<option value="12">December</option>
</select>
<select id="recorded_day"
name="recorded_day" class="input">
<option value="0">---</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="31">31</option>
</select>
<select id="recorded_yr"
name="recorded_yr" class="input">
<option value="0">---</option>
<option value="2007">2007</
option>
<option value="2006">2006</
option>
<option value="2005">2005</
option>
<option value="2004">2004</
option>
</select>
<input id="today" value="Today"
onclick="todayDate();" type="button">
<input id="reset" value="Reset"
onclick="clearDate();" type="button">
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
From:
</label>
<select id="frmtime_hour"
name="frmtime_hour" class="input">
<option value="0">---</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select id="frmtime_minutes"
name="frmtime_minutes" class="input">
<option value="0">---</option>
<option value="1">00</option>
<option value="2">15</option>
<option value="3">30</option>
<option value="4">45</option>
</select>
<select id="frmtime_ampm"
name="frmtime_ampm" class="input">
<option value="0">---</option>
<option value="1">AM</option>
<option value="2">PM</option>
</select>
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
To:
</label>
<select id="totime_hour"
name="totime_hour" class="input">
<option value="0">---</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select id="totime_minutes"
name="totime_minutes" class="input">
<option value="0">---</option>
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
</select>
<select id="totime_ampm"
name="totime_ampm" class="input">
<option value="0">---</option>
<option value="1">AM</option>
<option value="2">PM</option>
</select>
<input id="Button1" value="All
Day" onclick="allDay();" type="button">
</p>
</div>
</div>
<div>
<center>
<input type='submit'
id="submitupload" value='Upload Video(s)' name="" />
</center>
</div>
<p>
</p>
</form>
best to explain my problem and your patience is very appreciated.
thanks.
I have a page that allows users to upload multiple files at once to a
remote file server. I am creating the script to handle the client
actions and need some help.
the problem:
for each file that gets added to the upload queue, data from the
page's inputs needs to get saved in an array prior to submit. How do I
approach this?
my (current) solution:
I have a class (called MultiUpload) that gets instantiated as so:
window.addEvent('domready', function() {
new
MultiUpload( document.getElementById( 'uploadForm' ).my_file_input_element,
0, '{id}', true, true ); });
The MultiUpload class has a number of inner functions, the ones
relevant here are addRow:function() which adds a new <DIV> row for
each uploaded file. Inside of addRow is the Element declaration for a
span where the name of the file is contained:
var item = new Element(
'span',
{
'class':'item',
'events':{
'click':function(uid){
this.activeRow( uid );
}.pass( current_element.uid, this )
}
}
).setText( name );
current_element is the element that has been currently added to the
queue (of array elements[]) and uid is its order (0,1,2,3,4...).
The span is given a 'click' event with function this.activeRow called.
The function attempts to do the following:
1) the first for loop (var f) searches the form for data input fields
and adds them to the array inputs.
2) the next for loop (var i) sets the count for the number of files
currently in the upload queue. "global_cnt" is always the limit or
last added file count.
3) the last for loop (var j) sets the number of the data inputs as the
limit.
Now, when the outter loop equals the current selected file (i == uid),
I attempt to use a multidimensional array to either populate the
feilds if data has already been set:
if(fileQueue[j]){ inputs[j].value =
fileQueue[j];
or store data if the user has entered something:
inputs[j].onchange=function(){
fileQueue[j] = inputs[j].value;
}
I am currently neither getting an error from try/catch nor getting the
code to store data and repopulate fields when I click on a file link.
So, I am not quite sure where to go from here....
Below is activeRow:
activeRow:function( uid ){
try {
var frm = document.uploadForm;
var inputs = new Array();
// Discover the data elements
for (var f = 0; f < frm.elements.length; f++)
{
if (frm.elements[f].className == "input") {
inputs[inputs.length] = frm.elements[f];
}
}
var fileQueue = new Array(global_cnt);
// Sort through files selected
for (var i=0; i<=global_cnt; i++) {
// If the file was clicked
if (i == uid) {
fileQueue = new Array(inputs.length);
for (var j=0; j < inputs.length; j++)
{
if(fileQueue[j]){
inputs[j].value = fileQueue[j];
}
if (inputs[j].onChanged)
fileQueue[j] = inputs[j].value;
}
}
}
}catch(e){alert(e.message);}
},
Finally, for what it is worth, below is my form HTML. I have been
advised to add it, so, sorry in advance to the "post lightly" camp:
<form id="uploadForm" name="uploadForm" method="POST"
enctype="multipart/form-data"
action="progress.aspx"
target="uploadFrame" onsubmit="return (callToServer(this.name))"
style="padding: 10px;">
<div id="set_one" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<label style="width: 85px; text-
align: right; float: left;">
Video file:
</label>
<input id="my_file_input_element"
type="file" name="file_1" />
<div style="display: none"
id="video-file-error" class="error-text">
Required field cannot be left
blank
<br />
</div>
<br />
<label style="width: 85px; text-
align: right; float: left;">
Title:
</label>
<input class="input" name="title"
id="title" maxlength="255" type="text"
size="53"
onchange="onTitleChange();">
<br />
<div style="display: none"
id="title-error" class="error-text">
<label>
Required field cannot be
left blank</label>
<br>
</div>
<br />
<label style="width: 85px; text-
align: right; float: left;">
Description:
</label>
<textarea class="input" rows="6"
cols="40" name="description" id="description"
onchange="onDescChange();"></
textarea>
<div style="display: none"
id="description-error" class="error-text">
Required field cannot be left
blank
<br>
</div>
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
Tags:
</label>
<input name="tags" id="tags"
maxlength="255" type="text" class="input" size="53">
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
Category:
</label>
<select class="input"
id="category" name="category">
<option value="[Select
category]" selected>[Select category]</option>
<option value="Attic">Attic</
option>
<option
value="Backyard">Backyard</option>
<br>
<div style="display: none"
id="genre-error" class="error-text">
Required field cannot be left
blank
<br>
</div>
<br />
<label style="width: 85px; text-
align: right; float: left;">
Language: </label>
<select class="input"
id="language" name="language">
<option value="[Select
language]">[Select language]</option>
<option value="AB">Abkhazian </
option>
<option value="AA">Afar </
option>
<option value="AF">Afrikaans </
option>
<option value="ZU">Zulu </
option>
</select>
<br>
<div style="display: none"
id="language-error" class="error-text">
Required field cannot be left
blank
<br>
</div>
</div>
<!-- END SET ONE -->
<div id="set_two" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Access:</b>
</label>
<label>
Public by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set2', 'img2')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img2" src="../icons/btn_down.gif" style="cursor: pointer;" /></
span></span>
<div style="clear: both;">
</div>
<div id="set2" style="margin-left:
10px; display: none;">
<p>
<input class="input"
type="radio" name="public" value="public">
<label>
Public - your video
will be included in search results.
</label>
<br>
<input type="radio"
checked name="unlisted" class="input" value="unlisted">
<label>
Unlisted - your video
will <b>not</b> be included in search results.
</label>
</p>
</div>
</div>
<!-- END SET TW0 -->
<div id="set_three" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Video Location:</
b>
</label>
<label>
Public by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set3', 'img3')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img3" src="http://www.trezoro.com/icons/btn_down.gif"
style="cursor: pointer;" /></span>
</span>
<div style="clear: both;">
</div>
<div id="set3" style="display:
none;">
<p>
<label style="width: 85px;
text-align: right; float: left;">
Address: </label>
<input class="input"
type="text" size="30" name="address">
<input type="button"
onclick="javascript:showAddress(this.form.address.value, 14); return
false;" value="" />
<br />
<br />
<label style="width: 85px;
text-align: right; float: left;">
Location: </
label>
<input type="text"
id="coords" name="coords" size="53" class="input" style="border-
style:none; color:Black; background-color:Transparent;" />
<br />
<br />
</p>
</div>
</div>
<!-- END SET THREE -->
<div id="set_four" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Privacy:</b>
</label>
<label>
Public by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set4', 'img4')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img4" src="../icons/btn_down.gif" style="cursor: pointer;" /></
span>
</span>
<div style="clear: both;">
</div>
<div id="set4" style="margin-left:
10px; display: none;">
<p>
<span style="float:
left;">
<label style="float:
left; margin-left: 10px;">
<b>Comments:</b></
label>
<span style="float:
right; margin-right: 10px; width: 275px;">
<input
type="radio" checked name="comments" class="input">
<label
style="width: 100px;">
Allow all
comments without approval.</label>
<br />
<input
type="radio" name="comments" class="strangers">
<label
style="width: 100px;">
I must approve
comments from strangers.</label>
<br />
<input
type="radio" name="comments" class="input">
<label
style="width: 100px;">
I must approve
all comments.</label>
<br />
<input
type="radio" name="comments" class="input">
<label
style="width: 100px;">
Disable all
comments on this video.</label>
<br />
</span></span><span
style="float: left; margin-top: 10px;">
<label
style="float: left; margin-left: 10px;">
<b>Ratings:</
b></label>
<span
style="float: right; margin-right: 10px; width: 275px;">
<input
type="radio" checked name="ratings" class="input">
<label
style="width: 100px;">
Allow
users to rate this video.</label>
<br />
<input
type="radio" name="ratings" class="input">
<label
style="width: 100px;">
Disable
ratings on this video.</label>
<br />
</span></
span><span style="float: left; margin-top: 10px;">
<label
style="float: left; margin-left: 10px;">
<b>Embedding:</b></label>
<span
style="float: right; margin-right: 10px; width: 275px;">
<input
type="radio" checked name="embedding" class="input">
<label
style="width: 100px;">
Allow
anybody to show this video.</label>
<br />
<input
type="radio" name="embedding" class="input">
<label
style="width: 100px;">
Keep
the video on this site only.</label>
<br />
</span></span>
</p>
</div>
<div style="clear: both;">
</div>
</div>
<div id="set_five" style="background-
color: rgb(176, 229, 124); margin: 10px;">
<span><span style="float: left;">
<label style="width: 85px;
text-align: right; margin-left: 10px;">
<b>Date and Time:</
b>
</label>
<label>
Today by default</label>
</span><span style="float: right;
margin-right: 10px;" onclick="expCollapse('set5', 'img5')">
<label style="text-decoration:
underline; color: Blue; cursor: pointer;">
Edit</label> <img
id="img5" src="../icons/btn_down.gif" style="cursor: pointer;" /></
span></span>
<div style="clear: both;">
</div>
<div id="set5" style="margin-left:
10px; display: none;">
<p>
<label style="width: 85px;
text-align: right; float: left;">
Date:
</label>
<select id="recorded_mo"
name="recorded_mo" class="input">
<option value="0">---</option>
<option value="1">January</
option>
<option value="2">Feburary</
option>
<option value="12">December</option>
</select>
<select id="recorded_day"
name="recorded_day" class="input">
<option value="0">---</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="31">31</option>
</select>
<select id="recorded_yr"
name="recorded_yr" class="input">
<option value="0">---</option>
<option value="2007">2007</
option>
<option value="2006">2006</
option>
<option value="2005">2005</
option>
<option value="2004">2004</
option>
</select>
<input id="today" value="Today"
onclick="todayDate();" type="button">
<input id="reset" value="Reset"
onclick="clearDate();" type="button">
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
From:
</label>
<select id="frmtime_hour"
name="frmtime_hour" class="input">
<option value="0">---</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select id="frmtime_minutes"
name="frmtime_minutes" class="input">
<option value="0">---</option>
<option value="1">00</option>
<option value="2">15</option>
<option value="3">30</option>
<option value="4">45</option>
</select>
<select id="frmtime_ampm"
name="frmtime_ampm" class="input">
<option value="0">---</option>
<option value="1">AM</option>
<option value="2">PM</option>
</select>
<br />
<br />
<label style="width: 85px; text-
align: right; float: left;">
To:
</label>
<select id="totime_hour"
name="totime_hour" class="input">
<option value="0">---</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
</select>
<select id="totime_minutes"
name="totime_minutes" class="input">
<option value="0">---</option>
<option value="00">00</option>
<option value="15">15</option>
<option value="30">30</option>
<option value="45">45</option>
</select>
<select id="totime_ampm"
name="totime_ampm" class="input">
<option value="0">---</option>
<option value="1">AM</option>
<option value="2">PM</option>
</select>
<input id="Button1" value="All
Day" onclick="allDay();" type="button">
</p>
</div>
</div>
<div>
<center>
<input type='submit'
id="submitupload" value='Upload Video(s)' name="" />
</center>
</div>
<p>
</p>
</form>