I have created a widget for users which they can embed to their site using the following code
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script src="http://www.socialfeastalpha.com/widget/xss_magic.js"></script>
<div id="socialfeast-widget"></div>
I want users to be able to customized the widget according to their needs.
any help is highly appreciated.
Thanks..
Simple solution: Make the URL to the JS script actually generate a unique script for each user.
Better solution: Make your users call a callback from your script with some identification information, ala Google Analytics.
Related
I have played enough with this code.
Mostly from line 1558-1680 but didn't find any solution.
It would be a great help if anyone could help me to add my API key to the link.
I am getting error "no API key" in console and the code works locally but doesn't work online
https://gist.github.com/anonymous/8dd127ffb42709348613d3cfcf056c63
credits to CodeXTree this code belongs to them.
PS: sorry for such a huge code
The API key belongs at the end of the script tag where you include the Google Maps js in your header or footer.
<script type="text/javascript" src="//maps.google.com/maps/api/js?key=YOUR_KEY_HERE"></script>
The gmaps.js code you linked to gets included below google maps:
<script type="text/javascript" src="path/to/gmaps.js"></script>
I am using LinkedIn share button on my site with the following html:
<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share" data-url="www.aidh.co.uk/blog/1506-exposure/default.html"></script>
The button brings up the Linkedin plug in with all of the content correct and options for sharing.
https://www.linkedin.com/cws/share?url=www.aidh.co.uk%2Fblog%2F1506-exposure%2Fdefault.html&original_referer=http%3A%2F%2Fwww.aidh.co.uk%2Fblog%2F1506-exposure%2Fdefault.html&token=&isFramed=false&lang=en_US&_ts=1432834994124.3257
However the share button on Linkedin's own page doesn't submit the information to Linkedin.
Can anyone help?
Take a look here: Official Microsoft LinkedIn Share API Documentation. It seems like the only valid format is something in the following form...
https://www.linkedin.com/sharing/share-offsite/?url={url}
For example...
https://www.linkedin.com/sharing/share-offsite/?url=http%3A%2F%2Frevoltlib.com%2F
This means that you only have the url param to modify.
If you are interested in a regularly maintained github project that keeps track of this so you don't have to, check it out! Social Share URLs
Read the documentation of LinkedIn plugin.
(https://developer.linkedin.com/docs/share-on-linkedin)
does anyone have an experience in embedding Visualize.js into APEX Application to integrate JasperServer Reports ?! Using the REST or iFrame is not a case i'm afraid. Not a big fan of JavaScript, but it looks like the only way this time. Done some research and didn't find any usefull info, as most of people using either REST or iFrame. Any help highly appreciated! At least show me at which direction to dig or the rough plan ... e.g do I need to upload some libraries and actually what to start with ?!
Thanks!
P.S. Apex 4.2.6 up and running, JasperServer 6.0 up and running.
I've been on Jaspersoft's visualize course and use Apex occasionally. You need to have a plain html region where you can write stuff and then use the visualize library to get reports and reports metadata from the server. You have to ensure that you are authenticated on the server and have a div or something in the dom where you can put the resulting report. You also have to grab the visualize library.
It would just be like adding any other custom html/javascript to an Apex application.
Here is a code sample to get visualize, authenticate and get a report into the dom:
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<!--
<script src="http://code.jquery.com/jquery-2.1.0.js"></script>
-->
<script src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript">
visualize({
auth: {
name: "jasperadmin",
password: "jasperadmin"
}
}, function (v) {
var report = v.report({
resource: "/public/Samples/Reports/9.CustomerDetailReport",
container: "#container"
});
});
</script>
<body>
<div id="container"></div>
</body>
</html>
Recently I develop a web application which has worked very well, than I move this web application into 000webhost.com and my domain is ks-hospitaldemo.tk. Now my problem is after upload my web application into free server my all JavaScript and jQuery are not worked. I use the following code ::
<footer id="indexFooter">
</footer>
</div>
<script type="text/javascript" src="_javascript/jquery-1.9.1.js"></script>
<script type="text/javascript" src="_javascript/menuBar.js"></script>
All my JavaScript file is placed into _javasSript folder in server.
Then I check my code and find some code which is not done by me, probably hosting server. This code is given below::
<!--//--><script type="text/javascript" src="http://stats.hosting24.com/count.php">
</script> <!--//--><script language="javascript">
<!--bmi_SafeAddOnload(bmi_load,"bmi_orig_img",0);//-->
</script>
Please help me to find my problem.
The new web server is using case-sensitive file lookups. The exact name of the directory is _javaScript but it's referenced in the HTML as _javascript. Use the exact name to fix the problem:
<script type="text/javascript" src="_javaScript/jquery-1.9.1.js"></script>
<script type="text/javascript" src="_javaScript/menuBar.js"></script>
You may want to check the permissions on the _javascript folder. Also, 000 Webhost is known to have problems with Google Analytics. If you have a Google Analytics code on your site, try disabling it.
Some proxy / CDN services / providers inject or transform code in your .html pages to "speed up" data transfer. I had the same problem when accessing my website from a smartphone.
The solution that worked for me was to append Cache-control in the head of the page:
<meta http-equiv="Cache-control" content="no-transform"/>
I've created a button whose function is to hide itself when clicked. But, it isn't working.Here's the code :
<html>
<body>
<button id="b">HIDE</button>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#b").click(function(){
$("#b").hide();
});
});
</script>
</body>
</head>
What's wrong with it?
That should work, but I'd strongly suggest you research the HTML for a valid document, i.e. </head> must appear before <body>.
Along with what alex said, it's possible that Chrome is blocking your request to the CDN-hosted jQuery. You can either give that domain valid permissions in manifest.json or simply download the copy of jQuery and store it locally.
If you are using SSL for your site, then you should serve your javascript/js file via https, else chrome will block it and causing your site's feature that is using that script not working.
I noticed that you are using http to call jquery from google cdn. May be it is causing that problem.