Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

load static modal with js and the next one not static

modal static js

This topic has been archived. This means that you cannot reply to this topic.
No replies to this topic

#1 LDDbyD


    CC Regular

  • Member
  • PipPipPip
  • 37 posts

Posted 23 December 2015 - 01:09 AM


I use this function to display a bootstrap modal (contact form: I don't want the user to be able to close modal by clicking outside of it or by pressing esc key):

function gsmodalcontact(id){
                $.post('../pages/contacts-infos.php', { gscontact: id }, function(data)
                            backdrop: 'static',
                            keyboard: false

I wrote another function to call a different modal on the same page (just display informations on a modal, the user can click outside or press esc key to exit modal):

function gsmodalrenovationcoordination(id){
                $.post('../pages/renovation-coordination.php', { gsrenovationcoordination: id }, function(data)
                            backdrop: 'true',
                            keyboard: true

The deal I challenge actually  ( :confused: ... a bit hard for me ...) is to display the contact modal with a function to avoid quitting the modal when the user fill it, and, on the same page, display some information on another modal, but for this one, the user can quit the way he wants.

Now when I use the functions here up, the first click define the $_POST values for modal and use them to all modals I display on this page, so it is not what I want: what I want is to set differents parms on different modals.

Do you have any idea?


Thank you!


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download