I am using this script for tooltips.
Is there any way to load content of tooltip from URL(dynamic loaded content from PHP script) instead of using path to html/php file?
Example
I need this:
Some link
instead of:
Some link
I had a brief look at the plugin, and you should be able to use /site/getcontent/1 without any issue.
Some link
(I'm assuming is being loaded on the same domain of your html file)
Related
I am trying to load a JSP page inside a modal in AngularJS.
The JSP page have lot of scripts and so I wont be able to take the source and create a separate template. The URL is from a different server but I have CORS enabled in my server. Is there someway we can include the file in a div using ng-include src=""? I already tried this but it is not working. Can anyone recommend a solution?
You are not writing a valid code the code should be like this:
<div ng-include="'file path'"></div>
Note: Make sure of single inverted comma within double inverted comma. And file path can be of your any absolute path. Do not write src while using ng-include.
I am using jquery.gdocsviewer.min.js plugin to read office and pdf documents in a website. The plugin is working fine. I am trying to get the content of the generated preview using jquery
var rowcontent=$('.embed').html();///embed is the class of the link
But I cant get this to work. Check a working fiddle
http://jsfiddle.net/4s8bn/133/
Please advice me on what to do or if its practical. I want to fetch the content and save it as html in a database.
In client side, it is not possible to get that pdf directly and save as html in database.You have to do it in server side. For server side,here is an example with php Once you get that in server side you can catch it with Ajax in client side.
Try:
var rowcontent = $('.gdocsviewer').html();
From the docs:
The plugin inserts a the IFRAME for the viewer inside an injected DIV.
The DIV tags all carry the class name "gdocsviewer", which allow for
styling all the gdocsViewer instances via CSS. If the anchor tag has
the ID attribute defined, then the injected DIV tag is also set an ID
attribute in the format of ID_of_Anchor + '-gdocsviewer'. See the demo
source code for more details.
I have used javascript to generate 2D bar-graphs in a HTML page.
When i am trying to load this HTML page containing bar-graph in to a div tag of some other HTML page using jQuery .load() function bar-graph (i.e, scripts) are not loading.
Please help on this issue.
For example i have bar-graph in xyz.html.
I am trying to load xyz.html in abc.html div tag using jquery .load() function.
Bar-graphs are missing.
Hoping for a reply, thanks for help in advance.
You should use iframe and load the html,I think,we can not directly load html in a div.
Are you generating the xyz.html output your self or is it created by some 3rd-party app?
If you're generating bar graphs your self, I recommend to generate just the content of body, not the whole site. Then the loading into abc.html should work correctly.
If they are not generated by you, use mhasan advice, but you shouldn't get the whole content oh html tag but only content of body tag.
BTW: have you an example of the script (js and html) somewhere to look at?
In jQuery you can use the
$(document).ready(function(){
});
to load the script when the page is ready. so you better put the chart generation script
inside this function in xyz.html (as said in your example).
You can also use this document.ready in your abc.html also to load the div.
UIWebView is loaded with a long html. How to paginate the UIWebView, without the content or image in it getting cut? I have tried using ePubjs but not sure how it works! Can anyone help?
There is JavaScript file contain function for pagination google it, and also you need to inject your HTML file to insert the HTML tags needed to make the pagination function work.
i want a javascript code which would fetch page contents like thumbnail images and contents and some text from the body as is shown in facebook when a link is shared .
please suggest me some technique or code for doing so
JQuery load would probably work for your purposes