As shown in the code, I want to get a click event to trigger the pop up ‘add-day-form’ which is a component. But by putting the @click=”showModal = true” in the wrapping div, when the pop up appears I cannot seem to press the close button that emits the close event. I only get it to close if i put
Tag: laravel
how do I pass a variable from js file to laravel controller to make a query based on the variable taken from an element clicked
this is code in laravel controller this is the js file im trying to receive the variable from to pass it to the query Answer The Front end will need to send data to the backend via a HTTP request. This can be done via AJAX. There are good libraries that you can use to do this such as AXIOS
Javascript hide/show elements does not work properly
I have added this checkbox to my form: So there is an onClick function named presellTXT() which goes like this: So when the checkbox is checked, it basically shows the element with an id of show_presell_text: So when the page loads, it should not be showing the Product Presell Text unless the checkbox is checked. Now if you take a
Initialize js function on the page
I have a js file where there is a function with multiple parameters And I want to use this function on different pages, but with slightly different parameters, let’s say for one of the pages there will be The question is, how do I call this initialization function on the page itself? The usual page for laravel, blade.php where at
Adding the column name in the table and links in vue
I am beginner web developer. I make my first crud in Laravel 8 and Vue. I use this component t in my project: https://www.npmjs.com/package/vuejs-datatable I have this code: DataTable.vue: Notes.vue: This code work fine. I have 2 problems: I would like the column headers in the table to be taken from: headers – currently these are the column names from
search autocomplete ajax in laravel
I am using ajax for live searching, but the problem is that It is shown only one result when I am using .html() but when I am using append() it works but every word i write it to duplicate the results, here is my code: in controller, ajax code in blade Answer Yes you set your content in your loop
What is the correct way of using axios.post in Vue 3?
I am trying to get axios.post to work in vue 3 with laravel 8 as backend but I am getting a POST http://localhost:3000/contact 500 (Internal Server Error). This is my vue component (without css): In addition, is there a way to use an array instead of properties inside of axios.post like so: Answer Try like following if You need to
ChartJS show value in legend (Chart.js V3.5)
I need the value of chart show after name of data for example ([colour of data] Car 50, [colour of data] Motorcycle 200). I’ve tried change the value of legend title but it doesn’t work at all Here is it my code: Answer You can use a custom generateLabels function for this:
I want to create a activate/deactive button in vue
This is my table. As you can see I have added a button to perform an action. The action needs to change active to not active and not active to active upon clicking. I cannot seem to find the SQL area that I could access which makes it difficult for me to update the database upon clicking. Any suggestions or
Why history.push does not work in route “/” in react?
In a React project I used react-router-dom. my question is why in route “/” history.push not worked ? Answer Let’s refer to this article: https://codesource.io/how-to-use-this-props-history-push-on-your-react-project/ It claims that the method has two parameters: path [state] The state parameter is optional, but it needs to be an object. Example: Your error therefore is that you include the path into the state,