How to show a single div from another html file?

Page: 1

Author Post
Member
Registered: Oct 2015
Posts: 9
How to show in a tooltip or other floatbox the content of a single div from another html file? A reference to file.html#idOfDiv gives the whole file.html shown in a neighborhood of the div.
Administrator
Registered: Aug 2008
Posts: 3382
AJAX is the mechanism for pulling in content from an external document. Use the "type:ajax" option on the initiating link to tell Floatbox to use AJAX to pull in the content.

What is delivered to the Floatbox by the AJAX fetch is controlled by the external page. You could create a simple html document which contains only the current div contents you are interested in and pull that html page in in its entirety. Or you could make the source page a smart php page which detects the AJAX request and returns only the html snippet of interest.

Page: 1