Fixed a bug of ajax-profil_edit
2 posters
Page 1 of 1
Fixed a bug of ajax-profil_edit
Default version of the jQuery library in Forumotion is 1.7.2. Codes use jQuery in forums are written based on this version.
On the user page, when you change the information, ajax-profil_edit function will help you change the information immediately.
Editing the information in user page
However, when you upgrade jQuery library version 1.9 or higher, that function would not be used.
To fix this, do the following:
ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management
Title * : Fixed bug ajax-profil_edit
Placement : In all the pages
Javascript Code * :
On the user page, when you change the information, ajax-profil_edit function will help you change the information immediately.
Editing the information in user page
However, when you upgrade jQuery library version 1.9 or higher, that function would not be used.
To fix this, do the following:
ACP >> Modules >> HTML & JAVASCRIPT >> Javascript codes management
Title * : Fixed bug ajax-profil_edit
Placement : In all the pages
Javascript Code * :
- Code:
/* Fixed bug ajax-profil_edit by Zzbaivong */
var forumVersion = 1; // Change the number 1 to 0 if your forum version is phpbb2
$(function () {
if (location.pathname.indexOf("/u") === 0 && _userdata.session_logged_in === 1) {
function attrValue(ele) {
var $this = $(ele);
$this.attr("value", $this.val());
}
$(".field_editable").on("input", [".post", ".inputbox"][forumVersion], function () {
attrValue(this);
}).on("change", "select", function () {
attrValue(this);
}).find("select, input, textarea").each(function () {
attrValue(this);
});
}
});
- For Technicians:
- Edit code in the user page as follows:
Change- Code:
.attr('value')
- Code:
.val()
Re: Fixed a bug of ajax-profil_edit
@Zzbaivong
Hi, I have already given my opinion on this link https://help.forumotion.com/t141456-a-bug-of-ajax-profil_edit-function#963167 , but in addition, I think that's completely irrelevant because it is not a "bug"!
Still, thanks for the tip...
JS
Hi, I have already given my opinion on this link https://help.forumotion.com/t141456-a-bug-of-ajax-profil_edit-function#963167 , but in addition, I think that's completely irrelevant because it is not a "bug"!
Still, thanks for the tip...
JS
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum