Welcome Guest Search | Active Topics | Sign In | Register

Customize Ajax uploader button Options
Suraj11
Posted: Tuesday, June 2, 2009 1:46:59 AM
Rank: Member
Groups: Member

Joined: 5/12/2009
Posts: 10
Hi there,
I am using the Ajax Uploader object and have customised the 'upload' button with one of my own button images. This works fine in Internet Explorer 6 and 7, but the image displays incorrectly in IE8 and Firefox (the image gets cropped on 2 edges). As cross-browser compatibility is very important for the website, please can you advise what code fix is required to combat this problem. Many thanks.
eo_support
Posted: Tuesday, June 2, 2009 8:34:46 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

How do you customize the upload button? If you edit the uploader's LayoutTemplate directly (right click the Uploader, then choose "Template -> LayoutTemplate" from the context menu, you will be able to replace the Upload button with an asp:ImageButton (the default is an asp:Button). You can then use whatever image you would like to use.

You can also use a HTML img element directly and then handle the image's onclick event to call the uploader's upload method. It will be something like this:

Code: HTML/ASPX
<img src="your_image.gif" 
onclick="eo_GetObject('AJAXUploader1').upload();" />


Once you edit the layout template, the uploader takes it as is. You can explicitly specify styles such as width, padding, etc on the image. That way it should render the full image across browser without any problem.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.