I am developing a website and now testing in all browsers, currently testing in firefox and found an error when using event.sourceElement?
I need e.srcElement to do this return value, just below, I am showing an example of how I get the return value of PropID.
I wrote a jQuery function that uses e.srcElement, and looks like this:
$(function () { $(".DownloadLink").click(function (e) { e.preventDefault(); var PropID = getParameterByName("PropID", e.srcElement.search), Token = getParameterByName("Token", e.srcElement.search), TrackingNumber = getParameterByName("TrackingNumber", e.srcElement.search); $.post("Valuation", { PropID: PropID, Token: Token, TrackingNumber: TrackingNumber}, function (taskId) { // Init monitors $("#dialog-modal").append($("<p id='" + taskId + "'/>")); updateMonitor(taskId, "Started"); // Periodically update Modal var intervalId = setInterval(function () { $.post("Progress", { id: taskId }, function (progress) { if (progress < 50) { updateMonitor(taskId, "Building File"); } else if (progress == 50) { updateMonitor(taskId, "Uploading File to FormMobi"); } else if (progress >= 100) { clearInterval(intervalId); updateMonitor(taskId, "Complete"); window.location.href = "downloadcomplete"; } }); }, 100); }); });
e.srcElement work example:
When testing in chrome and using a validation element, I can find that the following line is returned:
Line of code:
PropID = getParameterByName ("PropID", e.srcElement.search)
Returned result:
Search: "PropID = 77301 &? Token = 74d30c0e-b4ab-4164-9dfd-f35fd7091cdc & Trackingnumber = 367"
And so I can get the result of PropID.
Are there any other reasons why I need to return the values I need? Or How can I get e.srcElement to work in fireFox?