close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

File field validation

Thread began 6/17/2010 2:05 pm by nickj | Last modified 6/17/2010 8:02 pm by nickj | 612 views | 1 replies

nickj

File field validation

I would like to make a file field requires but the client side validation. The rule seems to ignore the content in the field. What am I doing wrong?

<form action="gallery_Insert.php" method="post" enctype="multipart/form-data" name="WADAInsertForm" id="WADAInsertForm" onsubmit="WAValidateRQ(document.WADAInsertForm.album_img,'Select Album',document.WADAInsertForm.album_img,0,true,'select');WAValidateAN(document.getElementById('WADAInsertForm').fileField,document.getElementById('WADAInsertForm').fileField.value,'Browse for an image file',true,true,true,true,'',document.getElementById('WADAInsertForm').fileField,0,true);WAAlertErrors('The following errors were found','Correct invalid entries to continue',true,document.getElementById('false'),false);return document.MM_returnValue">
<div class="WADAHeader">Insert Image</div>
<div class="WADAHorizLine"><img src="../../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<table class="WADADataTable" cellpadding="0" cellspacing="0" border="0">
<tr>
<th class="WADADataTableHeader">ID key_img</th>
<td class="WADADataTableCell"></td>
</tr>
<tr>
<th class="WADADataTableHeader">Album</th>
<td class="WADADataTableCell"><label>
<select name="album_img" id="album_img">
<option value="">Select One</option>
<?php
do {
?>
<option value="<?php echo $row_rsAlbum['id_alb']?>"><?php echo $row_rsAlbum['title_alb']?></option>
<?php
} while ($row_rsAlbum = mysql_fetch_assoc($rsAlbum));
$rows = mysql_num_rows($rsAlbum);
if($rows > 0) {
mysql_data_seek($rsAlbum, 0);
$row_rsAlbum = mysql_fetch_assoc($rsAlbum);
}
?>
</select>
</label></td>
</tr>
<tr>
<th class="WADADataTableHeader">Filename</th>
<td class="WADADataTableCell"><input type="hidden" name="filename_img" id="filename_img" value="" size="32" />
<label>filename2
<input name="fileField" type="file" id="fileField" size="60" />
</label></td>
</tr>
<tr>
<th class="WADADataTableHeader">Caption</th>
<td class="WADADataTableCell"><input type="text" name="caption_img" id="caption_img" value="" size="32" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Order</th>
<td class="WADADataTableCell"><input type="text" name="order_img" id="order_img" value="" size="4" /></td>
</tr>
<tr>
<th class="WADADataTableHeader">Icon</th>
<td class="WADADataTableCell"><input type="checkbox" name="alb_icon" id="alb_icon" value="1" />
click here if this is to be the icon for the album only one image should have this box checked!</td>
</tr>
</table>
<div class="WADAHorizLine"><img src="../../WA_DataAssist/images/_tx_.gif" alt="" height="1" width="1" border="0" /></div>
<div class="WADAButtonRow">
<table class="WADADataNavButtons" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="WADADataNavButtonCell" nowrap="nowrap"><input type="image" name="Insert" id="Insert" value="Insert" alt="Insert" src="../../WA_DataAssist/images/Pacifica/Refined_insert.gif" /></td>
<td class="WADADataNavButtonCell" nowrap="nowrap"><a href="gallery_Results.php" title="Cancel"><img border="0" name="Cancel" id="Cancel" alt="Cancel" src="../../WA_DataAssist/images/Pacifica/Refined_cancel.gif" /></a></td>
</tr>
</table>
<input name="WADAInsertRecordID" type="hidden" id="WADAInsertRecordID" value="" />
</div>
</form>

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...