How to make edit button work in a modal window?

Asked

Viewed 108 times

0

I don’t understand how to make the "Edit" button work within the modal...

Screen (clicking on details opens this modal where the edit button has): My modal: Modal information contained within the modal:

  • 1

    Instead of images with code, please paste the code as it is easier in case if we want to use your code to help.

  • 1

    Use the comments instead of writing your comment instead. You’re new here, I recommend reading here https://answall.com/conduct

  • 1

    Thanks for the tip Luís! I still can’t move very well here kk...

  • 1

    Right! In case, I would only do then a JS function calling it by onclik on the Edit button... A question, in my modal where you have the php information, there I should implement nothing ?

  • Depends on what you intend to do. Now you can create code in the function you will call in onclick, and this code can handle doing whatever you want. I have sent request in Linkedin.

  • Okay, I’ll try to do it this way! Thanks... I’ll look at Linkedin!

  • Thank you Leo......

  • I researched a lot about the edit button in function js, ajax, jquery, php... whatever it is...I saw several videos, I could not get anything example to do this...as I said, I am beginner still in you...but I joined a project for the purpose of learning, but I’m taking too long to understand and the deadline is coming kkk... Can anyone show me an example of edit button code that would work for me ??... Thank you

Show 3 more comments

1 answer

1


You have to create/call some action on the EDIT button.

You can do this using Javascript.

<button type="button" onclick="suafuncaoJS()" class="btn btn-dark">Editar</button>

I recommend effecting an ajax request. Search a little about this.

You can also put a href on it and send it to another page.

<button type="button" href="#paginadedestino" class="btn btn-dark">Editar</button>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.