Home › Forums › Bug Reports and Feature Requests › Set prop “value” does not work
- This topic has 11 replies, 2 voices, and was last updated 3 years ago by
kdv.
-
AuthorPosts
-
2022-09-30 at 4:43 pm #56267
NaxosCGCustomerHello,
To create some menus from puzzles, i need to set prop “value” to html host page, but it does not work…Please see attached screenshots.
img 1 : value-not-working-1.png : you can see that i put “src”, “width”, “height”, “classname”, and a “value” to an “img” html element…
(i’ve tried with variable, with “create text with variable”, but also with some manually entered text)img 2 : value-not-working-2.png : on the right what i would need (so with “value” param; on the left the generated code i get in the console : see ? src, width and so on are written, but not “value”.
Any idea ? is this a bug ?
Best regards.
Attachments:
"1+1=3... for large values of 1"
2022-09-30 at 5:00 pm #56270kdv
Participantthat’s because
valueis not one of<img>attributes
https://www.w3schools.com/tags/tag_img.aspvalueis an attribute of<input>
https://www.w3schools.com/tags/tag_input.aspP.S. You cannot set attributes
hrefordownloadto<img>too, for example.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-09-30 at 5:10 pm #56271
NaxosCGCustomerthat’s because
valueis not one ofattributes
https://www.w3schools.com/tags/tag_img.aspvalueis an attribute of<input>
https://www.w3schools.com/tags/tag_input.aspOk, but it is also available for img, as my menu i always use with my verge3D tests is using that way, it’s some js+html tabbed menus.
Anyway, i need to create the prop, and it does not, can you make it work in anyway ?In this menu system, the value is set to tell that this submenu “belongs” to that tab…
Best regards.
"1+1=3... for large values of 1"
2022-09-30 at 5:12 pm #56272
NaxosCGCustomerYou can see one example in this test :
https://v3d.net/b6iSee how the value is set and used.
"1+1=3... for large values of 1"
2022-09-30 at 5:22 pm #56273kdv
ParticipantSo what? You can write any attribute manually. But if an element doesn’t have this attribute you can’t set it.
<img>has a lot of attributes butvalueis not one of them. Theset proppuzzle sets value for an existing attribute. No attribute – no value set.

p.s. you can use the
titleattribute to filter<img>tags.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-10-01 at 5:54 am #56277
NaxosCGCustomerI get your point, kdv77kdv, and as you helped me before and as i’m not a code specialist, i’d rather trust you.
Just the code i’ve used (from a free website – i guess jQuery) for years now just uses “value” inside an “img” block.
Remember, i’m a 3D artist, clearly not a coder, but here i’m stuck because of that.
Maybe i could find another free html/js tabbed menu that accepts jpg as submenu content ?
Maybe you know one that i could use ?regards.
"1+1=3... for large values of 1"
2022-10-01 at 11:42 am #56286kdv
Participantyou use
jquery-ui.jsfor the tabbed menu, right? thisvalueattribute plays no role in the tabbed menu creating at all.
https://v3d.net/bclIn this menu system, the value is set to tell that this submenu “belongs” to that tab…
The
valueattribute tells nothing. It’s just not asked. It’s an unused attribute.You have severals
<div>elements with the class nameTabbedPanelsContent. Each of them hasid. And thisiddetermines what tab this element belongs to.

The only place where the
valueattribute is called is the script in the begining of the html document<script>$(document).ready(function() {$("img.min").click(function(){$("img.viewer#" + $(this).attr("value")).attr("src", $(this).attr("title"));});$("#TabbedPanels1").tabs();});</script>This script creates tabs (you need them) and registers the event listeners ‘click’ for every
<img>element (you don’t need them). So you can reduce this script to creating tabs only.<script>$(document).ready(function() {$("#TabbedPanels1").tabs();});</script>Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-10-10 at 1:15 pm #56541
NaxosCGCustomerHello,
Can you add the “tabindex” property in the “set prop” puzzle list for html, please ?
I need it for some stuff. It may be the reason why my puzzles don’t create nice menu, as espected.
Thank you."1+1=3... for large values of 1"
2022-10-10 at 1:45 pm #56542kdv
Participantdocument.getElementById('some_id').tabIndex = 0;Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-10-10 at 1:46 pm #56543
NaxosCGCustomerdocument.getElementById('some_id').tabIndex = 0;I’ll give a try, thank you.
"1+1=3... for large values of 1"
2022-10-10 at 2:42 pm #56545
NaxosCGCustomermmm, still not ok…
"1+1=3... for large values of 1"
2022-10-10 at 9:49 pm #56560kdv
ParticipantWhat’s wrong? Can’t swith between tabs with
TABbutton? It should work with no problems…
https://v3d.net/bclPuzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
-
AuthorPosts
- You must be logged in to reply to this topic.


