View Full Version : combining AJAX calls
JPnyc
09-13-2007, 04:19 PM
I was about to embark on a project but figured I should come here first and ask if such a thing is even possible. With the Ajax features already included in vBulletin 3.5 and up, can calls to other objects/page elements be added onto the existing Ajax features/functions?
In other words, if when Post submits or edits are updated by Ajax, can I also update other page elements with the same function call/user event?
Dismounted
09-14-2007, 09:11 AM
Yes, if there are hooks available in the correct places.
JPnyc
09-14-2007, 06:47 PM
I created a plug-in containing the function calls I need, and hooked it on Ajax start, then I tried it on Ajax complete, that I tried it on edit, but no dice. Can anyone give me a clue how I can get these functions called on Ajax post submits an Ajax edits submits?
JPnyc
09-20-2007, 12:10 PM
Can anyone give me a clue which hooks?
JPnyc
10-04-2007, 04:43 PM
Would the Ajax_start and/or Ajax_complete hooks call anything when posts are submitted or edited with Ajax enabled? Or would the post-editing hooks still apply? I've tried a few to to no avail thus far.
--------------- Added at 00:15 ---------------
Wow, thanks for all the help, folks. Might I suggest a forum name change to "gofindyourownanswers.org" ?
JPnyc
10-11-2007, 04:30 PM
I still can't solve this. Am I better off writing my own AJAX script and just calling it onclick of the edit/submit buttons, or is there a way for me to piggyback on the existing AJAX functions in vb 3.5.7? The page elements I wish to reload are randomly loaded serverside with PHP. They're included in a plugin, and placed into vars for placement into forum templates, if that helps to any degree.
Analogpoint
10-11-2007, 05:48 PM
Do you want to do something like update the user's post count in all the posts instead of just the new one?
JPnyc
10-15-2007, 12:43 PM
hi, thanks for the reply. No, we have three advertising positions that need to be called along with the Ajax functions, and reloaded to the page via Ajax. What I don't know is if there is any way to add them to the existing Ajax functions in 3.5, or if I have to write a separate Ajax script and call it either on click of the edit/submit buttons, or via a plug-in.
In short, I really have no idea of how to address this, regarding the direction to go in. So far I'm even having difficulty locating the Ajax script in 3.5. It's easy to find in 3.6
Analogpoint
10-15-2007, 07:31 PM
IMO, it would be easier to fire your own ajax routine to fetch the ads when the user clicks "post" than to try and piggyback on the vb routines.
JPnyc
10-16-2007, 01:35 AM
OK, thanks. That's how I'll approach it then
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.