Sorry folks I wrote it too quickly.
this block
============
var attributes = new Array("DEFAULT1","DEFAULT2","DEFAULT3");
for (var i=0; i<attributes.length; i++){
attributes[i]= new Array();
}
=============
Is not needed and can be chopped off.
On Tue, Oct 14, 2008 at 11:13 PM, Henry Lu, Sun Certified Java Programmer <
[EMAIL PROTECTED]> wrote:
> Like anything else in RedeDot CMS, data transaction is a bunch of RQL. Data
> capture is done in simple html forms.
>
> The attribute entry is no exception. All you need to hack is the
> RDEditFileAttributes.htm file in "C:\Program
> Files\RedDot\CMS\ASP\Mediacatalog" folder.
>
> This simple form pre-populate the attribute values from what is stored in
> DB. When submit button is clicked, the form in turn captures the attribute
> entries, new or old and store them back in DB.
>
> The default field type is "text" -- that causes all your grief. You want
> <select> with a bunch of option list.
>
> Here are the steps to do the conversion:
>
> 1)Use your attribute names in a js script to define the affilaited values.
> (Of course, this is corny. When you want to get fancy, you can have a server
> side or javascript read an external xml file that associates the attributes
> with their respective values.)
>
> Something like this:
>
> <script type="text/javascript">
> var attributes = new Array("DEFAULT1","DEFAULT2","DEFAULT3");
> for (var i=0; i<attributes.length; i++){
> attributes[i]= new Array();
> }
>
> var attributes = new Object();
> attributes["DEFAULT1"]=new
> Array("attr1_value1","attr1_value2","attr1_value3","attr1_value4");
> attributes["DEFAULT2"]=new
> Array("attr2_value1","attr2_value2","attr2_value3","attr2_value4");
> attributes["DEFAULT3"]=new
> Array("attr3_value1","attr3_value2","attr3_value3","attr3_value4");
>
> listOptions=function(x){
> var optionStr='<option value="" selected>--Select One --</option>';
> for (var i=0; i<attributes[x].length; i++){
> optionStr+='<option
> value="'+attributes[x][i]+'">'+attributes[x][i]+'</option>\n';
> }
> document.write(optionStr);
> }
> </script>
>
> 2)Change the form field input type from "text" to "select"
>
> <!--ioStart Write-->
> <tr>
> <td class="label" width="41%"><img border="0"
> src="../Icons/Mediaattribut.gif" align="absmiddle" width="16" height="16">
> <%AttributeName%>
> </td>
> <td width="59%">
> <select name="<%FormFieldName%>" id="Text2" style="width:150px;">
> <script type="text/javascript">
> listOptions("<%AttributeName%>");
> for(var i=0; i<document.ioForm.<%FormFieldName%>.options.length; i++){
> if
> (document.ioForm.<%FormFieldName%>.options[i].value=="<%AttributeValue%>"){
> document.ioForm.<%FormFieldName%>.selectedIndex=i;
> break;
> }
> }
> </script>
> </select>
> <!--<input type="text" name="<%FormFieldName%>" size="50" id="Text2">-->
> <SCRIPT
> language="JAVASCRIPT">document.ioForm.<%FormFieldName%>.options[document.ioForm.<%FormFieldName%>.selectedIndex].value=unescape("<%AttributeValue%>");</SCRIPT>
> </td>
> </tr>
> <!--ioEnd Write-->
>
> Then load the file to its original location and you are in business.
>
> I've attached the modified htm file and the screenshot of the pull-downs
> are like when run.
>
> ============
>
> Like any hack to RedDot, back up the normal file first before hacking. This
> hack is a "shallow" one. It does not have much risk but -- I've got to put
> the disclaimer here: use at your own risk.
>
> If you want to use it but are not sure how to go about it, feel free to
> contact me.
>
> Henry Lu
>
>
>
>
>
> On Tue, Oct 14, 2008 at 5:44 PM, Gavin Cope <[EMAIL PROTECTED]> wrote:
>
>>
>> Sorry, it's not possible to enter anything other than text for the
>> mandatory attributes on asset managers. Maybe put in a feature request
>> to RedDot for this.
>>
>> Cheers,
>>
>> Gavin
>>
>>
>>
>> On 10/15/08, RedDotDan <[EMAIL PROTECTED]> wrote:
>> >
>> > I'm still learning RedDot so this may be a dumb question or the answer
>> > may be over my head, but I'm hoping it's neither. When a user uploads
>> > a file into asset manager, we sometimes force them to fill in file
>> > attributes. But when we do, the user is presented with a text box to
>> > fill in whatever they want. Is there a way to make those drop-down
>> > lists so that we get common attribute descriptions throughout the
>> > asset library?
>> >
>> > We have a library search function now where users can search by
>> > attributes, but the results returned are rarely accurate since users
>> > are not always required to fill in atributes and since atribute
>> > descriptions are not consistent across all the files. I think adding
>> > ddl during file upload would improve our search results going forward.
>> >
>> > Any help would be appreciated.
>> > Thanks,
>> > Dan
>> > >
>> >
>>
>> --
>> Sent from Gmail for mobile | mobile.google.com
>>
>> >>
>>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---