jQuery

In case you have not realised, HR.Net is using jQuery for some of it’s functionality on screens.
So power of jQuery is at your mercy when you write the Custom Scripts for the screens.
Shame that the version of jQuery is heavily outdated: current release (today is 6 Nov 2012) is 1.8.2, but HR.Net uses version 1.2.6 which was released on May 24th, 2008. More than 4 year old technology.

Anyway, enough slagging off guys from Vizual, I’m sure they are not fond of their technical debt they already have…

What I was going to say that AJAX calls did exist in jQuery even in 2008. So I don’t see a reason why not use that on your HR.Net screens.
For example one of the usages I have found is validation of new records against database even before they go into the database.
The script I’m looking at just now is validating new Maternity record against all the existing Absence records:

function sendRequest(){
	$.ajax({
		type: "GET",
		url: "/hrnetsupport/MaternityValidator.php",
		data: { person_id: "EF831A66-CC57-45F5-8435-001BF5E77DA3", startdate: "01/01/2001", enddate: "01/05/2002" },
		dataType: "json",
		error: function(data) { 
			alert("Some server error. Please report to your system administrator: " + data.message); },
		success: function(data) {
			if (data.success !== true) {
				alert(data.message)
			}
		}
	});
}

I’m sure that does not make sense to you and looks like garbage. I’m sure it is. I’ve just quickly scratched that in a notepad, did not check if that works. But if you know what jQuery is, then you’ve got the idea. I hope I don’t need to tell you, that you need to provide infrastructure and logic for MaternityValidator.php as well. (PHP is not essential, any other server side language can do the work)
If you don’t know jQuery, but need some complex data validation, it is worth investing your time in studying jQuery and AJAX.
Or you can hire me to script up the validations for you -))

This entry was posted in Uncategorized and tagged , , , . Bookmark the permalink.

7 Responses to jQuery

  1. FWing says:

    Interesting stuff, how does it feel knowing more about HR.net than 99.9% of Vizual (now ADPs) staff?

    Also which company do you work for? I thought I had you figured out but… well lets just say the person I thought you were isn’t you.

  2. admin says:

    knowing more than most of Vizual staff (I hope that is not true) does not make me any better, but makes them look pale -)

    Regarding your second question, I’m independent consultant now, not associated with any company that have connections with HR.Net. Why do you ask?

  3. Dan Hutson says:

    Is it possible to get a list of the parts of HR.net that allow AJAX calls? This would be really useful for a number of forms I have made, especially for checking repeating sections

    • admin says:

      Dan,

      It is unlikely that native HR.Net provides any AJAX API. Or put it this way – I did not find any hook-in points. And I did look for that with traffic sniffing tools (Fiddler).

      For all the AJAX stuff I have done, I had to do the server part as well.
      I used PHP on server-side because that was easily available and easy to deploy. But I suspect if you are going to need a lot of AJAX, it would be more relevant to create a dedicated web-site for that using ASP.Net.

Leave a Reply

Your email address will not be published. Required fields are marked *