\").html(settings.androidPostUnsupportedMessageHtml).dialog(settings.dialogOptions);\n } else {\n alert(settings.androidPostUnsupportedMessageHtml);\n }\n\n return;\n }\n\n //wire up a jquery dialog to display the preparing message if specified\n var $preparingDialog = null;\n if (settings.preparingMessageHtml) {\n\n $preparingDialog = $(\"
\").html(settings.preparingMessageHtml).dialog(settings.dialogOptions);\n\n }\n\n var internalCallbacks = {\n\n onSuccess: function (url) {\n\n //remove the perparing message if it was specified\n if ($preparingDialog) {\n $preparingDialog.dialog('close');\n };\n\n settings.successCallback(url);\n\n },\n\n onFail: function (responseHtml, url) {\n\n //remove the perparing message if it was specified\n if ($preparingDialog) {\n $preparingDialog.dialog('close');\n };\n\n //wire up a jquery dialog to display the fail message if specified\n if (settings.failMessageHtml) {\n\n $(\"
\").html(settings.failMessageHtml).dialog(settings.dialogOptions);\n\n //only run the fallcallback if the developer specified something different than default\n //otherwise we would see two messages about how the file download failed\n if (settings.failCallback != defaultFailCallback) {\n settings.failCallback(responseHtml, url);\n }\n\n } else {\n\n settings.failCallback(responseHtml, url);\n }\n }\n };\n\n\n //make settings.data a param string if it exists and isn't already\n if (settings.data !== null && typeof settings.data !== \"string\") {\n settings.data = $.param(settings.data);\n }\n\n\n var $iframe,\n downloadWindow,\n formDoc,\n $form;\n\n if (httpMethodUpper === \"GET\") {\n\n if (settings.data !== null) {\n //need to merge any fileUrl params with the data object\n\n var qsStart = fileUrl.indexOf('?');\n\n if (qsStart != -1) {\n //we have a querystring in the url\n\n if (fileUrl.substring(fileUrl.length - 1) !== \"&\") {\n fileUrl = fileUrl + \"&\";\n }\n } else {\n\n fileUrl = fileUrl + \"?\";\n }\n\n fileUrl = fileUrl + settings.data;\n }\n\n if (isIos || isAndroid) {\n\n downloadWindow = window.open(fileUrl);\n downloadWindow.document.title = settings.popupWindowTitle;\n window.trigger('focus');\n\n } else if (isOtherMobileBrowser) {\n\n window.location(fileUrl);\n\n } else {\n\n //create a temporary iframe that is used to request the fileUrl as a GET request\n $iframe = $(\"