Refresh on loading from js.

I have a site which use some js to do slider activity, such that a link is opened in a <div> of an the open html.
This works fine, except that reftagger does not work on the text read into the div of the already open html.
I have tried adding the reftagger to the html of the file which is loaded into the <div>, but this does not work.
I do not know js, and so can only assume that as the js for reftagger is at the end if the html, anything new added will not be linked to logos. Is there a way to refresh so the reftagger js reruns when the new div has been loaded.
(the existing site is churchofchristnewport.org). At the moment there are no pages going to the main div which require logos links - I created a full new page for the one I wanted to just add to the main page and centre div.
Hope this is clear and understandable. Thanks in advance for any help.
Comments
-
I think I have the same issue. I am filling a div with a javascript call using XMLHttpRequest(). But since the page has already loaded I think the tagger script has already run. I need something that will tag the newly loaded div like an onload event. So, far I have not been able to find a solution other than reloading the whole page.
I put the link to the source javascript in the page header then tried running the logos calls in the script that filled the div, but it did not work.
e.g. this does not work
<html><head><script src="http://bible.logos.com/jsapi/referencetagging.js" type="text/javascript"> </script></head>
<body><div id="foo"></div></body></html>
( an onclick event calls a js function that fills the div with document.getElementById("foo").innerHTML='blah blah ... Jn 3:16 ESV"; and has the logos script in it)
0 -
This functionality would enable bookmarklet capabilities as well.
As I see it, all that would need to be done to do this would to enable call the same function that links up the document onLoad.
0 -
Inserting the RefTagger script on your site creates a refTagger object that has a "tag" method that can be used to run the tagger again on the page or selected portions of it.
However, in order to use it, you'll need to know a bit of Javascript.
David Mitchell
Development Lead
Faithlife0 -
Could you give a quick example of the 'tag' method? For example, how it is called. Or, if you have a site I can goto to see it? It sounds like the 'tag' method is exactly what I am looking for.
0 -
David Mitchell said:
Inserting the RefTagger script on your site creates a refTagger object that has a "tag" method that can be used to run the tagger again on the page or selected portions of it.
However, in order to use it, you'll need to know a bit of Javascript.
Can you tell what the 'e' parameter that needs to be passed to the 'tag' function is? Can we access the uncompressed source of RefTagger? Thanks
0 -
Filipe Moreira said:
David Mitchell said:
Inserting the RefTagger script on your site creates a refTagger object that has a "tag" method that can be used to run the tagger again on the page or selected portions of it.
However, in order to use it, you'll need to know a bit of Javascript.
Can you tell what the 'e' parameter that needs to be passed to the 'tag' function is? Can we access the uncompressed source of RefTagger? Thanks
The 'e' parameter is the root element that should be tagged. There are presently no plans to release the unminified source.
David Mitchell
Development Lead
Faithlife0 -
Thank you David. I've managed to get it working with the dynamic inserted content.
0