upload and cancel buttons not displayed

This post has 15 replies

Not Ranked
Posts: 3
Sydow Posted: Sat Mar 28, 2009 @ 11:01 PM
I'm trying the Upload control for the first time. I'm using the server side example code, almost unchanged. I have all the component art image files in an image folder. The Browse image is displayed, but the Upload and Cancel buttons don't display. That makes sense at first, but after browsing and selecting a file, they still don't display. I can hover over the spot where the upload button should be, and click, and the upload works. It's just that the button isn't there.

Dan
Not Ranked
Posts: 3
Sydow Posted: Mon Mar 30, 2009 @ 9:44 AM
The Browse button appears, and I understand where that comes from. The Upload control:

ComponentArt:Upload
...
FileInputImageUrl="images/_browse.png"
FileInputHoverImageUrl="images/_browse-h.png"
...

And the anchor tag (using '[' and ']' here for the open and close tags because I don't know how html looks posted in this message)
:
[a href="javascript:void(0);" onclick="this.blur();return false;" class="browse" title="Browse for a file"]#$FileInputImage[/a]

For the upload button, there's nothing comparable in the Upload control, and the anchor tag has nothing between the open and close tag:

[a href="javascript:void(0);" onclick="init_upload(UploadVideo);this.blur();return false;" class="upload-d" id="btn-upload"][/a]

So it makes sense that no upload button would show up. Obviously, I'm overlooking something obvious. Ideas?
Top 10 Contributor
Posts: 6,424
hwan Posted: Thu Apr 2, 2009 @ 11:54 AM
The CSS styles contain the visual parts for those buttons in our examples, but you're welcome to change them to your liking ie. not use CSS if that's your approach.
Not Ranked
Posts: 3
Sydow Posted: Thu Apr 2, 2009 @ 1:39 PM
I see that with the Browse button, which is displayed. The anchor tag uses this:

#$FileInputImage

I don't see anywhere in the ComponentArt code where this is defined. Not to mention I don't understand where the #$ itself comes from (never seen that before).

There is not similar thing referenced for the Upload anchor tag (so it makes sense no Upload button is displayed). How do I know what to use in the upload anchor? Is there some similar #$FileUploadImage defined (if so, how would I know about it?).

There's something fundamental I'm missing here (and everyone else seems to get, as I don't see anyone else having an issue with the Upload control images being displayed).
Top 10 Contributor
Posts: 865
sberkovitz Posted: Wed Apr 8, 2009 @ 11:39 AM
The upload and cancel buttons are using CSS classes to specify which image to use. you could use a standard img tag instead.

Does this answer your question?
Steven Berkovitz MBC Development Ltd. & OrderDynamics Corporation http://www.mbccs.com http://www.orderdynamics.com
Not Ranked
Posts: 1
rshaw Posted: Wed Jan 19, 2011 @ 4:27 PM

I also can't get this to work properly. If I define my own client Template for formating the upload component without including

the #$FileInputImage, the 'browse' functionality does not work at all -- I cannot get the new dialog/window that allows the user to select which file from their system to upload.

Can you please post an example of a very basic client template to do this that DOES NOT use the #$FileInputImage tag.

I've looked at your 'bare bones' example, and it does not help in this instance (no client template usage).

Top 10 Contributor
Posts: 694
ajay Posted: Thu Jan 20, 2011 @ 7:17 AM

Hello,


I have attached a sample application in which I have defined the Upload control as you have mentioned. Please test the attached sample and let me know if it is working for you. I have tested the sample in latest build version which is 2011.1.1124 with IE8 browser.


Hope it helps you.


Thank you.
Ajay Mishra

Not Ranked
Posts: 3
JoAnn Posted: Thu Jan 20, 2011 @ 8:35 AM
Thanks for getting back so quickly. However, your example does not help. You have not used a <clienttemplate> in your example as I had asked. Your example is very similar to the 'bare bones' example that uses the upload component's 'default' behaviour -- in which you do not customize anything. I want to customize the <input> field for the file being uploaded, as well as the 'browse' button and 'upload' button. I've included what I had in mind (which doesn't work) because the javascript events for displaying the 'browse' dialog box that should appear when clicking on the 'browse' button is not included -- because I can't find what javascript event is needed for this to happen (can't find it in your documentation)

<

 

 

ComponentArt:Upload ID="Upload1" RunAt="server" AutoPostBack="false" OverwriteExistingFiles="true"

 

 

OnUploaded="Upload1_OnUploaded" MaximumFileCount="1"

FileInputClientTemplateId

="FileInputTemplate">

 

="FileInputTemplate">

 

="FileInputTemplate">

="FileInputTemplate">

 

 

 

<ClientEvents>

 

 

<FileChange EventHandler="file_change" />

 

 

<UploadBegin EventHandler="upload_begin" />

 

 

<UploadEnd EventHandler="upload_end" />

 

 

</ClientEvents>

 

 

<ClientTemplates>

 

 

<ComponentArt:ClientTemplate ID="FileInputTemplate">

 

 

<input value="## DataItem.FileName ? DataItem.FileName : "Please select a file to upload"; ##" />
<a href="javascript:void(0);" onclick="<NEED javascript function required to do the browse and populate the input field with selected file to upload>" title="Browse for file">Browse</a>

 

 

<a href="javascript:void(0);" onclick="init_upload(Upload1);this.blur();return false;" title="Upload file">Upload</a>

 

 

</ComponentArt:ClientTemplate>
...

</

 

 

ClientTemplates>

 

 

</ComponentArt:Upload>

Hope this helps a bit more. I'm interested in customizing the ClientTemplate.

Top 10 Contributor
Posts: 694
ajay Posted: Thu Jan 20, 2011 @ 10:35 AM

Hello,


Thank you for getting back to me.


I would suggest you to try using an IMG tag inside the anchor. For more information I would suggest you to refer the following forum link:


<http://www.componentart.com/community/forums/p/61045/99258.aspx#99258
>


Hope it helps you.


Thank you.
Ajay Mishra

Not Ranked
Posts: 3
JoAnn Posted: Thu Jan 20, 2011 @ 11:22 AM
Thanks, but i've already looked at that posting also. It does not apply to my issue. That posting is about the 'upload' portion of the component, which I have no issues with at all -- works great. My issue is with the 'browse'.
Not Ranked
Posts: 9
Florence5387 Posted: Sun Feb 13, 2011 @ 11:47 PM
Hi,
I face similar issue in customizing client template.Can anyone pls help me understand what $#FileInputImage does in the componentart upload examples?
Top 10 Contributor
Posts: 694
ajay Posted: Mon Feb 14, 2011 @ 7:27 AM

Hello,


I would like to tell you that ‘#$FileInputImage’ is used for setting the URL for browse button (FileInputImageUrl) using client template.


Hope it helps you.


Thank you.
Ajay Mishra

Not Ranked
Posts: 9
Florence5387 Posted: Tue Feb 15, 2011 @ 4:30 AM
Hi Ajay,

Thanks for your reply.

I am using the markup/css and images from Componentart demo files.

Functionality works fine . But the browse button image '_browse.png' is not getting displayed. I am sure the image is present in the right path.
All other buttons are getting displayed except the browse.

Any ideas to get this working? I am using Componentart Web UI for 2011.

Thanks,
Florence
Not Ranked
Posts: 9
Florence5387 Posted: Tue Feb 15, 2011 @ 4:36 AM
Oops..my bad... I had the wrong path ...Thanks for your help !!
Top 10 Contributor
Posts: 694
ajay Posted: Wed Feb 16, 2011 @ 5:15 AM

Hello,


Thanks for getting back to me.


It is glad to hear that your issue has resolved. 


Thank you.
Ajay Mishra

Page 1 of 2 (16 items) 1 2 Next >