question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select Data Target

See original GitHub issue

Hi,

I trying to create a selection list to a variable called fck, but indepent of the selection made it bring the results of previous variables:

image image

Here is the code:

'<h3> Dimensionamento de Seções</h3>'
'<hr />
'<h4>Materiais</h4>'
'<h5>Coeficientes de Ponderação</h5>'
'Coeficiente de minoração do aço
γ_s = ? 
'Coeficiente de minoração do concreto
γ_c = ? 
'<h4>Concreto</h4>'
#pre
'<p>Escolha o fck - 
'<select data-target="fck">
'<option value=15>C15</option>
'<option value=18>C18</option>
'<option value=20>C20</option>
'<option value=25>C25</option>
'<option value=30>C30</option>
'<option value=35>C35</option>
'<option value=40>C40</option>
'<option value=45>C45</option>
'<option value=50>C50</option>
'<option value=55>C55</option>
'<option value=60>C60</option>
'<option value=65>C65</option>
'<option value=70>C70</option>
'<option value=75>C75</option>
'<option value=80>C80</option>
'<option value=85>C85</option>
'<option value=90>C90</option>
'</select></p>
#post
'<table id="fck">
'<tr><td>'f_ck = ? '</td></tr>
'</table>
f_cd = f_ck/γ_c
α_v2 = 1 - f_ck/250
#if f_ck ≤ 50
f_ctm = 0.3*f_ck^(2/3)
#else
f_ctm = 2.12*ln(1 + 0.11*f_ck)
#end if

Someone can tell me what i’m doing wrong?

Best regards

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Proektsoftbgcommented, Jul 6, 2022

Hi, I am glad you have managed. 😃 Thank you for your questions. You are so kind!

  1. I have not enabled sponsorship yet but I can do it if there is any interest.
  2. Any contributors are welcomed. There are a lot of things that need to be done, that require different skills. The general method is to clone the repository make changes and place pull requests. But it is good to coordinate the work. I can open a discussion for that purpose: https://github.com/Proektsoftbg/Calcpad/discussions.
  3. There are some external forums currently:
2reactions
Proektsoftbgcommented, Jul 5, 2022

You’d better also put the id in the immediately enlosing element, which is td in your case:

#show
'<table>
'<tr><td id="fck">'f_ck = ? '</td></tr>
'</table>
#post

You can even just use a paragraph element. If you wan’t to hide it so that that the user would not put any other values add also display:none style:

#show
'<p id="fck" style="display:none;">'f_ck = ? '</p>
#post
Read more comments on GitHub >

github_iconTop Results From Across the Web

Selecting element by data attribute with jQuery
$("[data-test]") will select any element that merely has the data attribute (no ... Target a collection of nodes which returns a nodelist
Read more >
[attribute] | CSS-Tricks
Here we select the image with a data attribute that starts with "out". The original image is replaced by an alternate image with...
Read more >
<select>: The HTML Select element - HTML - MDN Web Docs
The <select> HTML element represents a control that provides a menu ... the data value to submit to the server when that option...
Read more >
How to Find an Element Based on a Data-attribute Value in ...
Answer: Use the CSS Attribute Selector. You can use the CSS attribute selectors to find an HTML element based on its data-attribute value...
Read more >
How to select elements by data attribute using CSS
To select elements by data attribute using CSS, we use the attribute selector. The attribute selector allows us to target elements based on ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found