View Full Version : Custom JavaScript and Quick Edit
Pat-D
11-23-2008, 09:01 AM
I have a custom tag, implemented as plugin since the basic BBcode doesn't do it, that needs a JavaScript function call for full functionality.
Works just fine on new posts, page reloads, ...
However, the initialization JavaScript function is not called when the post is modified via Quick Edit (inline Ajax / Edit).
Is there some way around that problem?
Lynne
11-23-2008, 04:53 PM
Put the javascript in the showthread template?
Pat-D
11-23-2008, 05:28 PM
By now, I don't even think this is a VB problem, but, rather, a browser feature.
The plugin gets something like
... content ...
and returns something like
<div id="myID"> ... modified content ... </div>
<script type="text/javascript">myFunction("myID")</script>
And, well, that script never runs when the post is updated "inline".
Is there an Ajax callback?
Or some decent place to put an extra call without the need to edit any .js files?
Lynne
11-23-2008, 06:47 PM
A decent place to put your javascript function "myFunction"? As I said before, if you say it's missing in the showthread, then why not insert it into the SHOWTHREAD template?
Pat-D
11-25-2008, 03:23 PM
What I would need is something like "Hook: ajax_complete", but on the browser end, not server side.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.