Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

Get URl from an ImageField

Avatar

Former Community Member
Hello all,



i have an problem to get the url or href from an Image Field.



In the Image Field I have an embedded Image. Then I change the image at run time (I choose another image for the field).



When I use the JavaScript



textField1.rawValue = ImageField1.value.image.href;



the textField1 is empty.



When I will show the Href-Value in an alert box (app.alert(ImageField1.value.image.href);) I get an empty alert box.



Have anybody a idea?

Thanks.

Marc
1 Reply

Avatar

Former Community Member
The ;) after the image.href) should be an ; ).



Marc