2

I am having problem in using this plugin as i,am saving each of my message is Global variable and want to call the jquery function with that message on each transaction, that is added, edited, deleted. Here is what i do on sucessful event

    $GLOBALS['info_message']="Record Deleted Sucessfully";
    $loc = $request->homeURL.'dashboard.php?message='.$GLOBALS['info_message'];
    header("Location: $loc");

but i want to display that message(in url) via this jquery function

$("a").click(function(e){
        e.preventDefault();
        switch ($(this).attr('class'))
        {
            case 'success' : jSuccess('Congratulations, a success box !!',{
                                VerticalPosition : 'center',
                                HorizontalPosition : 'center'} ); 
                                break;
            case 'notice' : jNotify('Notification : <strong>Bold</strong> !'); break;
            case 'error' : jError('ERROR : please retry !'); break;

        }

    });

(ofcourse not on click function) for each of error, sucess and notice respectively. How can i implement This functionality.

1 Answers1

0
function message ()

    {
        $.get("dashboard.php",
        {
            message:"Record Deleted Sucessfully"
        },
        function(data,status){
        });
    }

Hope this helps you.

You can call that message() function on success, instead of PHP script. The above function will do this:
It will go on this url: dashboard.php?message=Record Deleted Successfully

function(data,status){ });
Here data is the returned data on above url (of dashboard.php). You can simply display it or do anything with it.

user1735921
  • 1,359
  • 1
  • 21
  • 46
  • (ofcourse not on click function) mentioned in question so have to do that thing by function call after that php script. –  Apr 21 '14 at 11:03