Calculadora - Show resultado Javascript [closed] - javascript

Closed. This question is not written in English. It is not currently accepting answers.
Stack Overflow is an English-only site. The author must be able to communicate in English to understand and engage with any comments and/or answers their question receives. Don't translate this post for the author; machine translations can be inaccurate, and even human translations can alter the intended meaning of the post.
Closed 5 days ago.
Improve this question
The calculator is ready. But, I can't find a way to make the result appear only when the user clicks the "save" button. So far, in codepen, it works (with the exception of making the result appear).
Another problem arises when all the code is posted on my site. When clicking on the "save" button, it does not display the result and the page loads.
HTML, CSS and Javascript codes are in the codepen: <https://codepen.io/kleyton/pen/QWVLemd>
The myDIV div must remain hidden until the user clicks on the button and it displays the results. That's the goal at the moment.
Thank you in advance for any help!

Related

Please help me to focus input field in the instagram web [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 12 months ago.
Improve this question
I want to achieve following algorithm:
Preconditions:
You are logged in instagram web version
You see the default home page
You are using chrome
It should be done via console tab in chrome
Task:
Do in vanilla JS the focus of the input field with a recommendation window
i.e
Focus the field, input cats, submit it and see the recommendation window
let search = document.querySelectorAll('[placeholder="Поиск"]')[0];
search.focus();
search.click();
Expected behaviour:
Search input found
Search input focused
Recommendation popup appeared
Actual behaviour:
Search input found
Search input not focused
Thank you for any assistance!

how do i send data to the clicked link in html/java/css [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 1 year ago.
Improve this question
what i need is a system that will let me send some data when a user clicks a link.
for example, if i had an html or javascript file that would display a color depending on data it gets, and the link you click to get there sends the data to that site that determines the color (sets a variable in javascript, or something like that).
i havent tried anything yet since i am new to html and have no idea how to do things that involve interacting scripts. i have looked at github projects with the results i want that use a '#' in the url
You can send the color you want the other site to show in a GET parameter.
E.g, your anchor could look something like this:
Red
Then, on site.com/page, you can use JavaScript to get the color parameter value:
const color = new URLSearchParams(window.location.search).get('color')

how to store new elements added in webpage by user? [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I want to store user changes in my webpage so that user can go to next page then come back on that page so that elements which he added should be there when he comes back for editing the webpage. I do not want to store data to the database until he submits the form.
let me explain with the example
in this image user add a new item to list by entering the name in input field I want to store these new items so that user can go to next and can come back with the list item present
You can use JavaScript to set a cookie with all the changes you want to keep. If the user returns to the page later, restore the changes from the cookie.

customize choosing a tag feature [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
So I have an app user can create a tag, and choose a tag to post their stories. Everything works fine, but I want to change the way user choosing a tag to post stories. Right now, user has to scroll through the tag they want(more tags created, more scrolls user has to do)
What I'm trying to do is to display, some main tags I make to be inside box and user to be able click the tag that the tag to be chosen. It would be nice to make a search engine that user can type and the tag to be shown up that user can pick....but this seems too advanced for me now. (if you know how, please let me know)
the above is what I hope mine to be replaced to.
I'm not even sure which code I should touch to make this happen.
views.py?forms.py? or is this javascript?html file?
I think you are searching for Select2, there is a django package called django-select2

What is the best way to generate HTML using PHP & JQuery [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've got a setup of HTML, PHP & jQuery. The steps I want the user to take are as follows:
Click a button
Modal Appears with dynamic data (taken from button markup, parent div etc.)
User Submits Modal & Close
I have two options. To:
Generate the HTML prior the user clicking the button. With PHP & Just hide it & then manipulate it with jquery once clicked.
Request the the HTML on click via Ajax using an API & again manipulate it with jQuery.
My question is. From the two options which would be the best for performance?
Reading through this and documenting my logic. I'd say that point 1. would be best as I'm not requesting a large amount of data through the API every time?
Can anyone see any advantages to number two? Apart from not requesting the data server side on page load?
Thanks.
I think the main question here is "how dynamic is the information used to produce that HTML ?".
If there isn't any high probability that the information used to produce that HTML could change at any time, then you should better off with 1st option, since therefore you will be avoiding an additional request to the server.
If the information used to produce that HTML could change at any time, that would be the reason to use the 2nd approach.

Categories

Resources