I put the php file in the function(r)?...
function('Pages/exec.php') {
     $('.modal-body').html('Pages/exec.php')
})..

Is that how it's supposed to be?

On Monday, 21 January 2013 11:14:10 UTC-5, Jake Alsemgeest wrote:
>
> Okay awesome.
>
> So just to clarify.. (I'm new to Javascript.)
>
> $(document).delegate('#clickButton', 'click', function() {
>      $('.modal-body').html('Loading...')
>      $.get('/ajax/get.php', {load:'buttonClick'}, function(r) {
>           $('.modal-body').html(r)
>      })
> })
>
> So the #clickButton is the id of the button.  The .modal-body is the div I 
> want the information to go into.
> At first it puts 'Loading...' into the modal body.
> Then it uses Ajax? (I assume this is something I need on the server...?), 
> it loads from the buttonClick...
> It then puts the contents of 'r' into the modal body.
>
> Is that right?
>
> Appreciate it.
>
> On Monday, 21 January 2013 00:30:40 UTC-5, John from Skem9 wrote:
>>
>> yeah.. you can do it a few different ways.. one way to do it would be 
>> having an id on that button in the modal thats loaded and do something like 
>> the following..
>>
>> $(document).delegate('a#clickButton', 'click', function(){
>>   $('.modal-body').html('Loading..')
>>   $.get('/ajax/get.php', {load: 'buttonClick'}, function(r){
>>     $('.modal-body').html(r)
>>   })
>> })
>>
>> John Brittain III
>> Kannapolis, NC
>> Programmer
>> http://www.skem9.com
>> Cell: 931-952-8700
>>
>>
>> On Sun, Jan 20, 2013 at 10:33 PM, Jake Alsemgeest <[email protected]>wrote:
>>
>>> Hey there,
>>>
>>> Okay, so I have a modal popping up perfectly fine.
>>>
>>> However, when there is no content in the database for it it has a button 
>>> to create content (an invite key kind of thing).
>>>
>>> I would like to be able to click the button <a href...> and then have 
>>> the invite key information show on the modal.  Rather then directing you to 
>>> a different page.
>>>
>>> I was just wondering if there is a way to change the contents of a modal 
>>> once it is already up.
>>>
>>> Just to re-iterate the example...
>>> - Open Modal.
>>> - Not enough content, so there is a button.
>>> - Click button.
>>>     - Does background stuff.
>>> - Shows key in modal window.
>>> - Done.
>>>
>>> Is this possible?
>>>
>>> Cheers,
>>> Jake
>>>
>>
>>

Reply via email to