The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
|
#1
|
|||
|
|||
![]()
hi
i think you'll find all the answers on the yui page http://developer.yahoo.com/yui/connection/ here's a example how i'm using it: Code:
var invites = { init:function() { YAHOO.util.Event.removeListener("ajaxinvites", "click", invites.init); YAHOO.util.Connect.asyncRequest("POST", "ajax.php?do=showinviteform", { success: invites.initform, failure: vBulletin_AJAX_Error_Handler, timeout: vB_Default_Timeout },SESSIONURL + "securitytoken=" + SECURITYTOKEN + "&do=showinviteform"); }, initform:function(a) { b = a.responseXML.getElementsByTagName("template")[0].firstChild.nodeValue; t = YAHOO.util.Dom.get('ajaxinvites').innerHTML; YAHOO.util.Dom.get('ajaxinvites').innerHTML = b; YAHOO.util.Event.on('sendinvite', 'click', invites.send, this, true); }, .....} Code:
vBTwitter.prototype.senddirect = function(e) { YAHOO.util.Event.stopEvent(e); YAHOO.util.Dom.get("progress_tweet").style.display='block'; YAHOO.util.Connect.asyncRequest("POST", "tweet.php?do=tweet", { success: this.sended, failure: vBulletin_AJAX_Error_Handler, timeout: vB_Default_Timeout },SESSIONURL + "securitytoken=" + SECURITYTOKEN + "&do=tweet&tweet=" + PHP.urlencode(YAHOO.util.Dom.get('twitter_tweet').value) ); // TODO need to check which function to use here to code msg } vBTwitter.prototype.sended = function(a) { var error = a.responseXML.getElementsByTagName("error")[0]; if (error) { YAHOO.util.Dom.get("progress_tweet").style.display='none'; alert(a.responseXML.getElementsByTagName("error")[0].firstChild.nodeValue); } else { YAHOO.util.Dom.get("progress_tweet").style.display='none'; YAHOO.util.Dom.get('twitter_tweet').value = ''; vBmenu.hide(); } } |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|