views:

47

answers:

0

I currently have jQuery code that looks like this:

if ($.url.param("s") == "error") {
    $.gritter.add({
        title: 'Error!',
        text: $.url.param('message')
    });
}

I'm checking to see if the request variable s exists in the url (ie. http://example.com/?s=error&message=this%20is%20my%20message and then showing a popup message that contains information from request variable message.

The popup works just fine, but the message variable isn't populated, the plugin asks for a string as a value for the text option. What is the proper way to grab the message variable?