• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1074
  • Last Modified:

How can I use jQuery blockUI to display a variable

I am using blockUI to display a waiting message while an ajax request is submitted. When the ajax request returns successful I am using blockUI to show a successful message. Within that message I would like to display the contents of data.message but I am unsure how to do this.

This is the ajax success code...

		success: function(data) {
			if (data.status == "success") {

				alert("SUCCESS " + data.message);   //Used to test variable

				$.blockUI({ message: 'SUCCESS' . data.message });

				setTimeout(function(){$.unblockUI;
				window.location.href = "index.php";
				}, 3000);

Open in new window


Could someone help?

Thanks

Steve
0
Steve Tinsley
Asked:
Steve Tinsley
  • 2
1 Solution
 
amit_gCommented:
You almost got it...

$.blockUI({ message: data.message });

Open in new window

0
 
Steve TinsleyAuthor Commented:
How can I have some text and use the variable??
0
 
amit_gCommented:
$.blockUI({ message: "Some text " + data.message });

Open in new window

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now