Question about attributes - Page 2

User 122279 Photo


Senior Advisor
14,450 posts

Eric Rohloff wrote:
Do you have a published page I can see or share a project?


I will share the project a little later today, no time right now. :)
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,450 posts

Getting back to this. https://www.dropbox.com/s/lhzhjz3ohl8d7 … s.zip?dl=0
The zip file contains two rsd files, both are attempts to build that tabbed gallery, both are based on the same code, this one:
https://www.w3schools.com/howto/tryit.a … mg_gallery
The only difference between them is, that in the 2nd file I tried adding the main image window as a html element. But they were both created before Twinstream mentioned the problem with the picture tag. I didn't have time to make any more attempts after that. If someone can help me make one of them work, I'd be very thankful.
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,188 posts
Online Now

You don't have an actual function to trigger on either of those projects.
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 122279 Photo


Senior Advisor
14,450 posts

I don't know how I was able to forget that...
In place now.

https://www.dropbox.com/s/dj98acdat73rl … s.zip?dl=0
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 187934 Photo


Senior Advisor
20,188 posts
Online Now

You have your function triggers in place but I'm still not seeing a function on the page. What do you actually want to do?
I can't hear what I'm looking at.
It's easy to overlook something you're not looking for.

This is a site I built for my work.(RSD)
http://esmansgreenhouse.com
This is a site I built for use in my job.(HTML Editor)
https://pestlogbook.com
This is my personal site used for testing and as an easy way to share photos.(RLM imported to RSD)
https://ericrohloff.com
User 244626 Photo


Registered User
811 posts

Here is the W3 example with javascript using onclick as a attribute.

Basically one can pass the element trigger (onclick attribute on div) to the function and then set variables resulting from a search of that element trigger for the nested images getting the src and alt information.

I also moved the id on the target picture to the container it was in. This allows one to get the container by id and then again search for the img nested within so we can change the src and alt with the variables we created above.

I run into this alot with the picture element creating problems with people who want to work with the <img> tag directly but have to work around it because you cannot add attributes directly to the <img> tag. Seems like a big tradeoff for just being able to add a small, medium, or big picture. I sure Coffeecup could come up with a way to give us the option of using just a <img> tag or a <img> tag using the <picture> tag but until then, its the only major limiting downfall of the program I can think of. The rest is awesome stuff ! (....yes I have made the request to Bob).



Attachments:
Bootstrap 5 CSS Grid.
User 122279 Photo


Senior Advisor
14,450 posts

Eric, there is no more code, I have used it all. I will go through the file and see if I have made any errors, I will not rule out that completely. The markup I'm trying to put into SD3 is in the attached file. You won't see much though, since I haven't copied and included the images.

After having created 60-odd building blocks nearly without having to ask for any assistance, I seem to have reached the limit of my capabilities here. Maybe it actually is the <picture> tag that is making me problems. I will discuss it with Bob, but I need to get on top of the specifications before I do, in order not to make a fool of myself. ;)

Attachments:
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,450 posts

Twinstream, you were apparently posting while I was writing. Have to read your post...
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 122279 Photo


Senior Advisor
14,450 posts

Hi Twinstream, that is brilliant! Am I right in that you used my code, only changed the js and moved the ID to the parent container instead of the image?
The moving of the ID I might eventually have thought of myself as I have done something similar in another project, but I would never have been able to change the js to fit the setup.
If this it the result of our combined efforts, is it ok with you that I include this gallery in my sharing folder and give you credit for helping?
Ha en riktig god dag!
Inger, Norway

My work in progress:
Components for Site Designer and the HTML Editor: https://mock-up.coffeecup.com


User 244626 Photo


Registered User
811 posts

Yes you are correct, that is your project with the changes you mentioned. Feel free to share.
Bootstrap 5 CSS Grid.

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.