The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I have someone helping me out with a minor modification on my vB 4.2.1 forum who is having trouble with an AJAX function.
A custom checkbox userfield needs to be updated. Here is the line for the AJAX request: Code:
var postData = {"do" : "saveuserfield", "fieldid" : "5", "securitytoken" : SECURITYTOKEN, "userfield" : {"value" : cValue}}; Any ideas? Any help appreciated! |
#2
|
|||
|
|||
![]()
Here's some code from clientscript/vbulletin_profilefield_edit.js:
Code:
var A = new vB_Hidden_Form(null); A.add_variables_from_object(this.element); YAHOO.util.Connect.asyncRequest("POST", fetch_ajax_url("ajax.php"), {success: this.post_save, failure: this.request_timeout, timeout: vB_Default_Timeout, scope: this}, SESSIONURL + "securitytoken=" + SECURITYTOKEN + "&do=saveuserfield&fieldid=" + this.fieldid + "&" + A.build_query_string()) this.element is the form object that has the fields for the profilefield being edited. You can also just call the vB_Hidden_Form function add_variable() for each variable to be added, if there's no form object. The code for vB_Hidden_Form is in clientscript/vbulletin-core.js. |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|