Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Modal Window in MySQL

    http://www.countyfairgrounds.net/tes...om/testtwo.php

    I am trying to integrate modal windows with a MySQL database. - the "idea" is to ha a click button on each event that would open up the model window for more information. Can we do this? - Otherwise I am looking for some kind of solution - whee you can open up more information about a particular event either within that table of that event or by haveing sometihing float in . Would a popover work? I cannot get the modal to work

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,592
    Thanks
    0
    Thanked 645 Times in 635 Posts
    You haven't said what language you are trying to implement the modal window with. The database is irrelevant to the question about the window as that just contains the data which has been copied from there by the time the modal window appears.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    hi - okay I can do this - or try to , and believe me I have been really really trying to and it is majorly stressing me out - to do this a couple ways ... the code on that page right now is from this link below and is ONLY html5 and css3 - I made an extensive attempt at setting it up BUT as you can see the modal window is showing on the page when it should not be - below the two listings that are there. The modal window should not appear until the get information link is clicked -- period ... for each listing....
    Here is what I have used for this code....
    http://www.webdesignerdepot.com/2012...tml5-and-css3/

    Can you tell me how to fix it? Otherwise we can try bootstrap -I guess

    I REALLY REALLY appreciate your help

  • #4
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,592
    Thanks
    0
    Thanked 645 Times in 635 Posts
    That will create the modal window for you - that just leaves you needing to use some other language to extract the data from the database to display in that window.

    If you are going to preload the modal info when the page loads then it can be done using the same server side language as you use to read the data from the database in the first place.

    If tyou want it to dynamically load the data when opening the modal window then you'd need to use JavaScript to call the server to retrieve the data (which sort of defeats the purpose of creating the modal window without JavaScript).
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #5
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    okay, thanks for the input. I got it. I have been having some problems with the "simple" bootstrap modal installation. For one thing I cannot tell what version of bootstrap I have - I downloaded it a month ago and I have version 1.9 something of jquery. Am I suppose to be use the .min version of bootstrap? and jquery ? they are all in my js folder on our site.
    Let me ask this important question. - Well, I don't php - I do the html5 and css3 - my php guy does the php. The question is - can I have a modal window for each event listing....? obviously its the same modal window BUT the data that appears in it each time we would want to be different depending on which event the user chooses to view more information on .
    Or maybe I should use a popover.js script for this page instead?

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,592
    Thanks
    0
    Thanked 645 Times in 635 Posts
    To use the same modal with different data each time and without reloading the entire page you would have to use JavaScript. In which case doing the entire modal in JavaScript so that you can hide it completely if JavaScript is not available would probably be best.

    You'd either need to have all of the data loaded into the page at the start or use JavaScript to call a PHP script on the server to retrieve the additional information for each.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #7
    Regular Coder
    Join Date
    Jan 2011
    Posts
    302
    Thanks
    7
    Thanked 0 Times in 0 Posts
    thanks. I have forwarded your reply to my php guy. Let me ask this question. Can you tell me what javascript files in the bootstrap modal download to use? I have the latest bootstrap.js, bootstrap.min.js (which I am presuming is a part of bootstrap.js) and jquery.min.js (which I am assuming is a part of jquery.js) and bootstrap-modal.js in my js folder on the countyfairgrounds website ftp. Are these right? or should I use bootstrap-modal.js with this webpage we are trying to fix?


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •