User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 401,458 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,102 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 430 | Replies: 1
Reply
Join Date: May 2008
Posts: 4
Reputation: sugarbabee is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sugarbabee sugarbabee is offline Offline
Newbie Poster

Page only works in FF

  #1  
May 22nd, 2008
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: May 2008
Posts: 4
Reputation: sugarbabee is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
sugarbabee sugarbabee is offline Offline
Newbie Poster

Re: Page only works in FF

  #2  
May 27th, 2008
anyone?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 1:28 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC