Set URL image

112 views
Skip to first unread message

jd.fa...@gmail.com

unread,
Apr 8, 2015, 11:26:05 AM4/8/15
to suppor...@runmyprocess.com
I have a problem to change the URL of a dynamically image. Here is my Javascript but this one does not work :

id_image2.setUrl("https://live.runmyprocess.com/pub/1970086491/upload/b10b39f0-ddf0-11e4-8536-22000b861362/CTECH002_dessin_dimensions_ABCD_SMALL.png");

Thank you for help.

Sweta Suman

unread,
Apr 8, 2015, 10:54:35 PM4/8/15
to suppor...@runmyprocess.com
Hi,

You want to change/set the image dynamically based on condition. Is that your requirement ?

Could you please elaborate if I misunderstood your requirement ?

Thanks,
Sweta 
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/bbab118d-0353-497a-9dbf-610bc0985f63%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Jean-Daniel Faessler

unread,
Apr 9, 2015, 5:47:57 AM4/9/15
to suppor...@runmyprocess.com

Hi,


Thank you for your reply. Yes, that's what I would do. Actually, I've done but I have not memorized the script (id_image.setUrl RMPApplication.setUrl ...) and I know it works.


Jean-Daniel



De : Sweta Suman <ssu...@runmyprocess.com>
Envoyé : jeudi 9 avril 2015 04:54
À : suppor...@runmyprocess.com
Objet : Re: [supportforum:7051] Set URL image
 
You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/NVz1dbYnGJY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum...@runmyprocess.com.

Sweta Suman

unread,
Apr 9, 2015, 6:44:42 AM4/9/15
to suppor...@runmyprocess.com
Hi,

To change the image dynamically on condition. Let's take an example we have text input "Location". Image will vary based on location entered.

var loc= RMPApplication.get("location");  // location is value variable of location box
if(loc=="Sydney")   // check for condition
{
}
else
{
}


If you still face any problem, please revert back.

Thanks,
Sweta


Jean-Daniel Faessler

unread,
Apr 9, 2015, 7:48:32 AM4/9/15
to suppor...@runmyprocess.com

Hi,


Thank you for the quick return. I tried this script, but he went in error?!?


var loc=RMPApplication.get("choix_des_types_de_dimension_3");
if (loc=="A")
{
id_image3.setUrl("https://live.runmyprocess.com/pub/1970086491/upload/b10b39f0-ddf0-11e4-8536-22000b861362/CTECH002_dessin_dimensions_ABCD_SMALL.png");
}
else
{
id_image3.setUrl("https://live.runmyprocess.com/pub/1970086491/upload/b10b39f0-ddf0-11e4-8536-22000b861362/CTECH002_dessin_dimensions_ABCE_SMALL.png");
}


Jean-Daniel


De : Sweta Suman <ssu...@runmyprocess.com>
Envoyé : jeudi 9 avril 2015 12:44
À : suppor...@runmyprocess.com
Objet : Re: [supportforum:7058] Set URL image
 

Sweta Suman

unread,
Apr 9, 2015, 9:21:12 AM4/9/15
to suppor...@runmyprocess.com
Hi,

Please provide me the error you are getting on script execution(double click on error).

Thanks,
Sweta

Jean-Daniel Faessler

unread,
Apr 9, 2015, 10:03:12 AM4/9/15
to suppor...@runmyprocess.com

Hi,


The error is as follows :


com.google.gwt.core.client.JavaScriptException: (ReferenceError) : id_image3 is not defined


Yet id_image3 is the id of my image widget?


Jean-Daniel



De : Sweta Suman <ssu...@runmyprocess.com>
Envoyé : jeudi 9 avril 2015 15:21
À : suppor...@runmyprocess.com
Objet : Re: [supportforum:7060] Set URL image
 

Jean-Daniel Faessler

unread,
Apr 9, 2015, 12:08:26 PM4/9/15
to suppor...@runmyprocess.com

Hi,


I found the problem. I think there is a bug in the application. My script is in a custom widget. If this widget id name, the script made a mistake. If this widget does not id name, the scipt works!

Strange, no ?


Jean-Daniel



De : Jean-Daniel Faessler <jd.fa...@djeser.onmicrosoft.com> de la part de Jean-Daniel Faessler <j...@djeser.ch>
Envoyé : jeudi 9 avril 2015 16:03
À : suppor...@runmyprocess.com
Objet : RE: [supportforum:7062] Set URL image
 

Sweta Suman

unread,
Apr 10, 2015, 6:42:29 AM4/10/15
to suppor...@runmyprocess.com
Hi,

If you want to access any widget which is inside custom widget you need to write it as custom_widget_identifier.widget_identifier in JS. It will throw undefined error if accessed directly using widget_id.

However, if you are not defining identifier of custom widget it will be directly accessible.

It is recommended to define and access using custom_widget identifier. Refer below code for reference -

var loc=RMPApplication.get("choix_des_types_de_dimension_3");
if (loc=="A")
{
Reply all
Reply to author
Forward
0 new messages