The key is to send a response header like this: Access-Control-Allow-Origin: * In the Apache web server, one enables this via the following directive: Header set Access-Control-Allow-Origin * This requires the use of mod_headers, which is enabled by default in Apache. For example:
JS Show the spinner called “first”: jQuery(‘#Spinner-first’).fadeIn(); Hide the spinner called “first”: jQuery(‘#Spinner-first’).fadeOut(); Hide all spinners that start with an ID of “Spinner”: jQuery(‘[id^=Spinner]’).fadeOut(); That’s All Folks…
Use the “dataFilter” Ajax option given the following server reply: { status: 17, result: “You are not logged in” } [code] var $tabs = jQuery(‘#menutabs’).tabs({ ajaxOptions: { dataFilter: function(server_json_reply){ var data = jQuery.parseJSON(server_json_reply); if (data.status == 17) { alert(‘Your session has timed out and you have been logged off.’); window.location = “/”; } return data.result; […]
Some examples of how to access the option values and text in an HTML SELECT via javascript: onchange=”groupsFilter(this.options[this.selectedIndex].value); return false;” onChange=”if (this.options[this.selectedIndex].value != ”) submit()” Take the option text currently highlighted and use it to populate another location in the web page: replaceSpan(‘unit1’,this.options[this.selectedIndex].text);
Tuesday, 1:52am…Finally got the Groups filter working! It allows the user to create as many groups as they want, then allows them to assign each medication to as many groups as they want. Then can use the groups to filter on the Medications page. Tomorrow I will write the code to a group of meds […]