Page 1 of 1

NXT-List/Forms with FF 4.0: Duplicate Record fails

Posted: 2011-03-31 15:00
by jguert
Hi,

I have encountered a problem in NXT-List/Forms with FF 4.0: Duplicate Record fails.
The "insert as new" button does not work any more. In worst case the changed content will overwritten.

Does anyone have the same effect?

In

Code: Select all

/includes/nxt/scripts/form.js
(lines 334-355) found the function:

Code: Select all

function nxt_form_insertasnew(obj, var_name) {
	var frm = obj.form;
	if (is.ie && frm.action == '') {
		var action = window.location.href
	} else {
		var action = frm.action.toString();
	}
	parts = action.split("?");
	var qs = new QueryString(parts[1]); var new_qs = [];
	var re = new RegExp('^'+var_name, 'g');
	Array_each(qs.keys, function(key, i) {
		if (! key.match(re)) {
			Array_push(new_qs, key+'='+qs.values[i]);
		}
	});
	var new_part = new_qs.join('&');
	action = parts[0];
	if (new_part != '')
		action += '?' + new_part;
	frm.action = action;
	return true;
}
Any Ideas?

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Posted: 2011-04-02 14:24
by Fred
I don't often use this functionality so I had to hunt for a site where I do use it.

I "edit" a record and "Insert as new" without any problems.
Did you upload the latest patches from the download section?

Do you maybe have some corruption on the files on the server?

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Posted: 2011-04-05 12:47
by jguert
HI Fred,

it seems to be a problem with Firefox 4.0 for Mac only. On a Windows PC with Firefox 4.0 it works fine.
Perhaps one of the next updates for Firefox 4.x for Mac will fix the problem on this platform.

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Posted: 2011-04-06 12:07
by Fred
Let us know...
Did you file a report with FF and describe the issues to them?

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Posted: 2012-06-26 10:10
by Hellkeeper
Hi,

this happens on new FF versions on MAC too ... anyone managed to get this working?

Andreas

Re: NXT-List/Forms with FF 4.0: Duplicate Record fails

Posted: 2012-06-26 11:11
by Hellkeeper
for now I made a quick'n'dirty fix for this problem (with jQuery):

Original:

Code: Select all

<input type="submit" class="KT_Insert1" name="KT_Insert1" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="nxt_form_insertasnew(this, 'id_nws');" />
Fixed:

Code: Select all

<input type="submit" class="KT_Insert1" name="KT_Insert1" value="<?php echo NXT_getResource("Insert as new_FB"); ?>" onclick="$('.KT_Update1').remove();nxt_form_insertasnew(this, 'id_nws');" />
Just add a class to every button - and on click remove the other buttons from the DOM ... working! ;-)