Welcome to the nuBuilder Forums!
Join our community by registering and logging in.
As a member, you'll get access to exclusive forums, resources, and content available only to registered users.
Questions related to using nuBuilder Forte.
Timo
Posts: 221 Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time
Unread post
by Timo » Fri Apr 27, 2018 6:55 am
My requirement is to load a different image to an Object of Type Image when a form is opened.
I thought I could to this by JavaScript and tried
Code: Select all
nuAttachImage('logo', 'imgProject1');
but the image is not changed.
Code: Select all
if (nuFormType() == 'edit') {
switch (project) {
case 'project1':
img = "imgProject1";
break;
case 'project2':
img = "imgProject2";
break;
case 'project3':
img = "imgProject3";
break;
}
nuAttachImage('logo', img); ----> not working!
}
admin
Site Admin
Posts: 2829 Joined: Mon Jun 15, 2009 2:23 am
Been thanked: 30 times
Unread post
by admin » Fri Apr 27, 2018 7:38 am
Timo,
Do you have a div with an id of logo?
Steven
Timo
Posts: 221 Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time
Unread post
by Timo » Fri Apr 27, 2018 8:25 am
No, I use the Tab - Image of an Object of Type Image
The Image Object is an easy way to display a specific image stored in nuBuilder Files.
toms
Posts: 785 Joined: Sun Oct 14, 2018 11:25 am
Unread post
by toms » Sat Apr 28, 2018 7:24 am
Hi,
Change the Type of your object to HTML and nuAttachImage() will work.
Timo
Posts: 221 Joined: Thu Mar 15, 2018 9:26 pm
Has thanked: 1 time
Unread post
by Timo » Mon Apr 30, 2018 6:16 am
thank you, works