Hi,
I have a component which has a table, one column of which is a button.
Is there anyway I can change at runtime the image that is displayed? The URL currently points to: /ebasecontent/images/image1.gif
I want to be able to change that in certain circumstances when the form is initialised?
Thanks in advance.
Andy
Setting image source at runtime
Moderators: Jon, Steve, Ian, Dave
- Andy McMaster
- Ebase User
- Posts: 33
- Joined: Fri Feb 29, 2008 12:08 pm
- Location: Newcastle upon Tyne
- Contact:
Setting image source at runtime
0 x
<b>Do not despise the snake for having no horns for who is to say it will not become a dragon</b>
-
- Ebase User
- Posts: 97
- Joined: Thu Sep 13, 2007 6:07 am
- Location: The Netherlands
According to the Ebase documentation:
For more information:
http://dev-docs.verj.io/ufs/doc/Button_ ... c279134886
http://dev-docs.verj.io/ufs/doc/Styling ... ground.htm
Code: Select all
set BUTTONCOLUMN1.buttonProperties.backgroundImage = 'urlToImage';
http://dev-docs.verj.io/ufs/doc/Button_ ... c279134886
http://dev-docs.verj.io/ufs/doc/Styling ... ground.htm
Last edited by Vircos on Mon Nov 07, 2011 9:40 am, edited 1 time in total.
0 x
What's the meaning of Justice...
- Andy McMaster
- Ebase User
- Posts: 33
- Joined: Fri Feb 29, 2008 12:08 pm
- Location: Newcastle upon Tyne
- Contact:
I shall try that later. Thanks.Vircos wrote:According to the Ebase documentation:
Code: Select all
set BUTTONCOLUMN1.buttonProperties.backgroundImage = 'urlToImage';
Can you point me to where that was in the documentation please?
And is this version dependant?
Andy
0 x
<b>Do not despise the snake for having no horns for who is to say it will not become a dragon</b>
-
- Ebase User
- Posts: 97
- Joined: Thu Sep 13, 2007 6:07 am
- Location: The Netherlands
- Andy McMaster
- Ebase User
- Posts: 33
- Joined: Fri Feb 29, 2008 12:08 pm
- Location: Newcastle upon Tyne
- Contact:
-
- Ebase User
- Posts: 97
- Joined: Thu Sep 13, 2007 6:07 am
- Location: The Netherlands
Perhaps you can try using a hyperlink fieldtype in combination with HTML presentation (properties of Fieldcolumn - Presentation) instead of a buttoncolumn. Apply a "On Click" event to start the specific FPL-script.
As a default value you can use a Ebase field containing the URL to image as (for example &&PATHTOIMAGE).
In your FPL you get something like this:
In this case you need to overide the CSS to remove the blue hyperlink border arround the image.
I hope my example is understandable.
As a default value you can use a Ebase field containing the URL to image as (for example &&PATHTOIMAGE).
In your FPL you get something like this:
Code: Select all
set PATHTOIMAGE = '<img src="/ebasecontent/images/image2.gif" alt="image2" style="border: 0;" />';
I hope my example is understandable.
0 x
What's the meaning of Justice...
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Who is online
Users browsing this forum: No registered users and 104 guests