Romeo
Posts: 0
Joined: Sun Jul 21, 2013 3:08 am

Mapping an image

Hello!, I tried to map an image with a few solutions posted here, but, i just can't..

what I'm trying to do is show an image depends of the result of a service, I tried by url/ Json, image data, JS value return with the name of the image and set the src property in js mapping..

thanks in advance..

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Mapping an image

Hi Romeo,

Where do you store the image (in application, in database, on third-party server)?
Anyway, you would need to specify full path to the file.

Romeo
Posts: 0
Joined: Sun Jul 21, 2013 3:08 am

Mapping an image

Hi Katya, the images are in mysql DB, and it is correct, I put the full path value and the name of the image as return value:

this way in mapping JS :
$(''mobileimage_').attr('src', 'http://mydomain/images/'+value);

in url Json response, mapped the full path of the image in server to the mobileimage_n component

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Mapping an image

Hello! Where do you use the code you've posted above? Could you please send mapping screenshot?

Romeo
Posts: 0
Joined: Sun Jul 21, 2013 3:08 am

Mapping an image

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Mapping an image

Hi Romeo,

Please replace your JavaScript with the following:
codereturn 'http://mydomain/images/' + value;/code

Romeo
Posts: 0
Joined: Sun Jul 21, 2013 3:08 am

Mapping an image

Good morning!
I think I tried that line, but I'll check again!

Romeo
Posts: 0
Joined: Sun Jul 21, 2013 3:08 am

Mapping an image

It doesn't work!

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Mapping an image

Hello! We'll take a look.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Mapping an image

Should be working.. In response you get only image name? You can check that. On service Test tab specify request parameters and click Test to receive response. In address line put server URL which you've set in mapping and received in service test image name. You can also inspect element in browser and check image src attribute value.

Return to “Issues”