Hey guys So I have the following:
$(document).ready(function () {
$(".NotesAccessor").click(function () {
var notes_name = $(this).parent().prev().prev().prev().prev().prev().prev().prev().prev().html();
run();
});
});
This get a name for when someone clicks on the attribute and from there goes to this function that opens and starts the dialog:
function run(){
var url = '/pcg/popups/grabnotes.php';
showUrlInDialog(url);
}
function showUrlInDialog(url)
{
var tag = $("#dialog-container");
$.ajax({
url: url,
success: function(data) {
tag.html(data).dialog
({
width: '100%',
modal: true
}).dialog('open');
}
});
}
function update()
{
$.ajax({
url: '/PCG/termsofservice/accepted.php',
success: function() {
$("#dialog-container").dialog( 'close' );
}
});
}
function closeNotes()
{
$("#dialog-container").dialog( 'close' );
}
So give the variable notes_name over to a variable in PHP in the file that is opened up in the Jquery UI? Or do I have to send it over? I am not to certain on what to do.
David
jQuery’s
$.ajax()function has a method for passing data:Docs: http://api.jquery.com/jQuery.ajax/