So, a couple of my pages only work correctly in FF (I don't know about IE), I need it mainly to work in Safari. Please let me know if you spot anything in the script that would be incompatible...I'm new to javascript and Ajax and I didn't initially write this code.

The first page is a form to edit or create a new news release. There is a drop down menu that gives the option of selecting an old article (only new articles are displayed on the page). When an article is selected from this list, the 'Title', 'URL', "Blurb' fields are supposed to be automatically filled with the info. from the selected articles. This works in FF, but won't work in Safari or Opera.

function loadNewsRelease() {
	new Ajax.Request(url+'homepage_handler.php', {
		method: 'get',
		parameters: { newsId: $('chooseNews').value },
		onSuccess: function(xhr) {
			eval(xhr.responseText);
		},
		onFailure: function(xhr) {
			alert("Error "+xhr.status+": "+xhr.statusText);
			$('chooseNews').value = 0;
		}
	});
}

The other page is a listing of staff members and there are links to 'Release', 'Unrelease' (one is not clickable while the other is), and 'Delete'. These are all working in FF and again not in Safari or Opera:

function setReleased(id, strReleased) {
	new Ajax.Request(url+'profile_release_handler.php', {
		method: 'post',
		onSuccess: function(xhr) {
			$('releaseSwitch['+id+']').innerHTML = xhr.responseText.replace(/<\/?span.*?>/g, '');
		},
		onFailure: function(xhr) {
			alert("Error "+xhr.status+": "+xhr.statusText+'\n'+xhr.responseText);
		},
		parameters: {id: id, setrelease: strReleased}
	});
}

function deleteProfile(id) {
	new Ajax.Updater('profileList['+id+']', url+'profile_release_handler.php', {
		method: 'post',
		parameters: {delete: id}
	});
}

Sorry I can't give you an URL to see the pages as they're password protected and for users only. Any help you could offer would be greatly appreciated! Thanks

This article has been dead for over six months. Start a new discussion instead.