i am trying to add the open MapQuest leaflet plugins to my webapp. When I run the app I get this error in the console:
Uncaught ReferenceError: L is not defined
It is in line 45 of the mapquest js files that I add. I have an open app key and I am using the open js files and the open plugins. I have added these to my app and I have replaced the "YOUR_KEY_HERE" with my open appkey.
<script src="http://open.mapquestapi.com/sdk/leaflet/v1.s/mq-map.js?key=YOUR_KEY_HERE"></script>
<script src="http://open.mapquestapi.com/sdk/leaflet/v1.s/mq-geocoding.js?key=YOUR_KEY_HERE"></script>
Why am I getting this error and how do i fix it. Let me know if you need to see any code.
You get that error when it can't find L in global scope, the Leaflet object. You should include Leaflet before those scripts:
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
Related
When I recorded the network activity of my project on https://zeddrix.github.io/bible-query/, and looked at the path of my style.css, the path should be like this: https://zeddrix.github.io/bible-query/styles/style.css to access my CSS.
But instead of having that, I keep on having https://zeddrix.github.io/styles/style.css without the /bible-query/ that's why it can't be found.
The same happened with my images. For example, instead of having https://zeddrix.github.io/bible-query/img/play-btn.jpg, I keep on having https://zeddrix.github.io/img/play-btn.jpg without the /bible-query/ on the URL again.
I was expecting to have this (on Live Server):
But instead, I keep on having this (on GitHub Page):
Please help me. Here's my repository: https://github.com/zeddrix/bible-query
Try removing the first forward slash from all of the URL references. So, <link rel="stylesheet" href="/styles/style.css" /> would become <link rel="stylesheet" href="styles/style.css" />. This will turn it into a "relative" link, instead of an absolute link.
How to implement the DATE PICKER in PhoneGap/Android? Some people are suggesting to use Mobicroll, I guess it is paid. So anyone please explain me in detail how to use a 3rd party tool/plugin for the datpicker usage in HTML
I guess Mobiscroll is paid one that too for huge amount. For 2 or 3 functionalities we cant ot go for Mobiscroll.
You can go for jQuery UI which have some options and you can go for Bootstrap also.
Include the jQuery CDN in your HTML file.
Here you need to carefully to do 2 things. Are you using the bootstrap or not?
If not, no problem. You can use Jquery UI datepicker.
If yes, you have to first include the Bootstrap CDN and after that you have to include jQuery CDN.
Copy the items like below. Otherwise you will get Uncaught TypeError:
$(...).datepicker is not a function.
(If you copy jQuery Items and after that if you copy Bootstrap)
<!-- Adding below 3 files for Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!--Adding below files for jQuery UI-->
<link href = "https://code.jquery.com/ui/1.10.4/themes/ui-lightness/jquery-ui.css" rel = "stylesheet">
<script src = "https://code.jquery.com/jquery-1.10.2.js"></script>
<script src = "https://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
I use AddToAny plugin to a Joomla website. I need to replace the code so I can "preview page" instead of "print" (ctrl+p).
I found AddToAny files into /plugins/content/addtoany, but I see no code for print service code
There is no code in the plugin for links generation, unless if you're talking about the css class to add a specific link (see below).
All the links are generated via the AddToAny's js: http://static.addtoany.com/menu/page.js
As you probably already know, all the rendering is generated with classes (powered by the js file above): https://www.addtoany.com/buttons/customize/standalone_services
<div class="a2a_kit a2a_kit_size_32 a2a_default_style">
<a class="a2a_button_facebook"></a>
<a class="a2a_button_twitter"></a>
<a class="a2a_button_google_plus"></a>
<a class="a2a_button_pinterest"></a>
<a class="a2a_dd" href="https://www.addtoany.com/share"></a>
</div>
<script type="text/javascript" src="//static.addtoany.com/menu/page.js"></script>
This means the links themselves are not "generated" in the plugin, so your solutions are whether try to override the plugin via the MVC override plugin or develop your own solution.
When I click the browse button, I got error like this
Uncaught ReferenceError: $ is not defined
Can someone please tell me what is going wrong?
'$ is not defined' is the jquery error, you should try after including jquery min file in you code.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
I have an iframe application which works fine but the issue comes when the content of iframe is large the text appears to be cut down.
I registered the application as iframe and set as resizable.
I have applied the following code but nothing seems to work
<div id="FB_HiddenIFrameContainer" style="display:none; position:absolute; left:-100px; top:-100px; width:0px; height: 0px;"></div>
<script src="http://static.ak.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<script type="text/javascript">
FB_RequireFeatures(["CanvasUtil"], function(){
FB.XdComm.Server.init(xd_receiver.htm);
FB.CanvasClient.setSizeToContent();
});
</script>
I have xd_receiver.htm file in myapp folder.
Please help me on this
In my iframe app I use
FB.CanvasClient.startTimerToSizeToContent();
instead of setSizeToContent() which seems to work for me.
Edit:
Can your javascript actually see the xd_receiver.htm file? Does it need a path (absolute or relative?) Is Apache serving static files from that directory?
What browsers have you observed the problem in? Try running in firefox with firebug installed to debug javasript problems. I'm not sure if the code you posted is actually what you're using, but it seems to be missing quotes on the "xd_receiver.htm" and also, no api key.
Regarding the xd_receiver.htm--> If the path to your callback url is callback, it should exist at callback/xd_receiver.htm. You have specified a relative path, so if your canvas page lives at /foo/page.htm, then the receiver page should exist at /foo/xd_receiver.htm. You could also specify at absolute path like '/xd_receiver.htm' and just keep your xd_receiver at the root.
Your page should look something like this:
http://gist.github.com/156633