Skip to content
Advertisement

Tag: javascript

Vuetify dynamic height for v-img

I have a container that is not 100% height of the page, it is 80% plus 60px on top and on bottom. So the image inside should inherit the height of the container. Using the <img /> and a little of CSS it is easy to achieve but I wish to add a template with loading spinner and so I

Improve speed of my binary search algorithm

I have written a binary search algorithm in JavaScript: I wanted to ask if I can improve this algorithm to search faster or if some mistake is made here? EDIT: thank you guys for your help, this solution should work correctly now: Answer You are taking values as indices. If you take greater values than indices, you see your codes

Showing Image in django

I have a Django web app where I am uploading an image and showing some texts. But I am not able to show the image in the front end after uploading. views.py index.html How can I show the uploaded image here, I have little experience with javascript so If anyone can help me on this! what I tried so far

Can a child method have change handler in React?

I was wondering why the child component with the changed value is not getting rendered here. Isn’t it a good idea to have a child handle its own changes or better to have the controller in the parent? This is the Child TodoItem As you can see the state is changed with handleChange() but this does not fire the render.

Vue method not returning value

I’m currently working with Vue, I have a method that is suppose to return a string which is displayed in a <span>. When I console.log the value I’m able to get the correct value however is not being passed into the span tag. From the above code snippet you can see that I am returning a value tag. return tag

getElementById not working on td elements

I am trying to access table elements with getElementById but this code is giving me “null” as the console log? Does getElementById not work with tables? Answer Your HTML is invalid. While I can reproduce your problem by copy/pasting your code “as is”, it works fine if you put the <tr> and <script> elements in places they are allowed (i.e.

Advertisement