Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

DOM search mangles international characters in IE8

Go to End

2 Posts   1150 Views


Community Member, 288 Posts

6 August 2010 at 12:54am

Took me awhile to solve this but I finally managed to fix this so that it works in all browsers. The problem is the way the URL is constructed in the js before it's sent. My changes turn the url variables into an object and send it through $.get instead of $.ajax and it now works in all browsers that I've tried.

Request building in the search function line 218

request = window.setTimeout(function() {
	var url = $(container_id).attr('href').replace(/\[search\]=(.)*?&/, '[search]='+$input.val()+'&');
	var getObj = {};
	var getUrl = url.split("?");
	var getVars = getUrl.pop().split("&"); 
	var tempGet = [];
	getUrl = getUrl.shift();

	for (i = 0; i < getVars.length; i++) {
		tempGet = getVars.split("=");
		getObj[tempGet[0]] = tempGet[1];
	refresh($container, getUrl, getObj, '#srch_fld'); 

Refresh function line 383

function refresh($div, link, getVars, focus)
	 // Kind of a hack. Pass the list of ids to the next refresh
	 var listValue = ($div.hasClass('RelationDataObjectManager')) ? jQuery('#'+$div.attr('id')+'_CheckedList').val() : false;
	 jQuery.get(link, getVars, function(html){
		if(!$ && !$div.prev().length)
		if(listValue) {
		var $container = jQuery('#'+$div.attr('id')); 
		if (typeof focus == 'string') { 


Forum Moderator, 4102 Posts

6 August 2010 at 1:19am

Great, thanks for that!