The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
how i use ajax in vbulletin?
what the function of the request and i use it? thx for help. |
#2
|
||||
|
||||
![]()
<a href="https://vborg.vbsupport.ru/search.php?searchid=12914337" target="_blank">https://vborg.vbsupport.ru/searc...rchid=12914337</a>
|
#3
|
||||
|
||||
![]()
Very simple to initiate an AJAX request. vBulletin uses the YUI JavaScript framework.
Code:
YAHOO.util.Connect.asyncRequest('POST', scriptpath + '?do=ajax', { success: this.handle_ajax_response, failure: this.handle_ajax_error, timeout: vB_Default_Timeout, scope: this }, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + '&foo=' + foo); ![]() |
#4
|
||||
|
||||
![]()
I've posted yesterday tutorial i called "[How-To] AJAX in your Mods - In 5 simple steps" - describing this in a very simple & easy to understand way.
Just follow my sig link and then click "tutorials" section on top tab. |
#5
|
|||
|
|||
![]() Quote:
You shouldn't use the vb ajax handler anymore, instead the developers should use the method yui is providing! Look at the code, the vb devs have commented it.... ![]() |
#6
|
|||
|
|||
![]() HTML Code:
<script type="text/javascript"> <!-- function iimsg() { thisstring = message.value; YAHOO.util.Connect.asyncRequest('POST', 'savept.php?content=' + thisstring, { success: msgstr.handle_ajax_response, failure: msgstr.handle_ajax_error, timeout: vB_Default_Timeout, scope: this }, SESSIONURL + 'securitytoken=' + SECURITYTOKEN + '&foo=' + foo); } function Leaving() { iimsg(); } //--> </script> thx. |
#7
|
||||
|
||||
![]()
What are you actually trying to achieve with AJAX?
|
#8
|
|||
|
|||
![]()
i try to save the content of the posts that users write when they quit in mistake.
i mean that i do "<body onunload="savept(($editorid}_textarea)">" and i do ajax function.. but this dont work.. i try to add to textarea that his name is "message" action "onkeyup" ad do alert and it is dont work too. why it is dont work? thx. |
#9
|
|||
|
|||
![]()
someone?
|
#10
|
||||
|
||||
![]()
The browser does not initiate any JavaScript events when a user decides to close the page. The browser just closes...
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|