How can I embed this snapppt javascript? - javascript

I'm trying to embed a javascript from snapppt.com into a cms page. It shows me in console that the script has been loaded, but there is nothing showing up.
This is the code i get from snapppt.com:
<script src='//snapppt.com/widgets/widget_loader/724028e3-d261-411c-8042-c1901fbc8ad7/carousel.js' class='snapppt-widget'></script>
Do I need anything in addition to this?

I've tried to use the script and i get error in the console
Uncaught TypeError: $ is not a function carousel.js:69
I think that you use the code correctly but there is some error in the script that you are loading

Related

Object #<Text> has no method 'getBoundingClientRect' on XAJAX

recently, I'm getting very strange error using the libraries XAJAX. Everything seems to work correctly, but Chrome console gives me an error every time I run any element.
The page where I is happening is this:
http://es.woow360.com/
For example clicking on any tab business that appears in the search box it does is load a new panoramic generates this error:
Uncaught TypeError: Object #<Text> has no method 'getBoundingClientRect'
WombatUtils.getElementRect
M
U
Y
CrossbrowserMutationObserver.n
d.callbackWrapper
xajax.dom.assign xajax_core.js:210
(anonymous function) xajax_core.js:318
xajax.command.handler.call xajax_core.js:315
xajax.executeCommand xajax_core.js:404
xajax.tools.queue.process xajax_core.js:150
xajax.responseProcessor.xml xajax_core.js:165
xajax.responseReceived xajax_core.js:399
oRequest.request.onreadystatechange xajax_core.js:356
Here you have the link to the file where error occurs:
http://es.woow360.com/xajax/xajax_js/xajax_core.js
It's very strange. Until recently it worked fine.
But now fails.
It fails only on this page, also I have other pages that use the same library, and gives the same error.
Even in other domains, where I have loaded the library XAJAX gives the same error.
Not to be that.
The strange thing is that except for the error message, everything works fine.
Any idea?
Thank you!
I've got the same errors/warnings. Add-less chrome extension was the issue. Try to review extensions of your chrome.

Salesforrce: JavaScript Remoting "Uncaught ReferenceError: Visualforce is not defined"

I'm using JavaScript Remoting in my Force.com site. This works well apart from a scenario I have noted where when I click on an apex:commandLink or apex:commandButton in a component which then opens my component where my JavaScript remoting function exists, when I then try to perform my Remoting action I get an error as follows.
Uncaught ReferenceError: Visualforce is not defined
I do not get this error when I do not previously click on am apex:CommandLink or apex:commandButton in a previous component. Has anyone come across this before & if so know how to stop the error from occurring?
I'm assuming you're using Visual Force Page (VFP). In your VFP definition, make sure to include the controller that has the methods for JS remoting
<apex:page controller="YourController" ... />

Call jQuery Function after ajax load

So, the thing is i'm trying to import a slider with ajax, the slider works if you access the page directly:
http:// www.iloja.pt/ajaxload/ipod.php
if you try to access iloja.pt and click "reparações" and after that click "iPod" it calls the ipod.php page but the slider doesn't work. I tried to include the js files in many ways but the
i know i have to use bind function, but don't know how to do it.
There seems to be some javascript errors, specifically:
"animation is not defined"
You have many errors in that page, see Javascript console on Chrome or Firebug on Firefox.
In particular I can see this errors:
Failed to load resource: the server responded with a status of 404 (Not Found) [http://www.iloja.pt/js/jquery.ennui.contentslider.js?_=1326816532863]
Uncaught TypeError: Object [object Object] has no method 'ContentSlider'
your problem is that the browser can't load the contentslider.js library so you have an exception when using ContentSlider Method.
Try to fix the loading of the js.
Have you tried adding the async: 'false' parameter to your ajax call, that way it should load your code entirely before doing anything else...

Javascript Error: n is null in swfobject.js

My Web application renders me "n is null" Javascript error in firefox browser when i try to access a particular page. This error originates in swfobject.js file.
Also i get another Javascript error "a is null" in firefox browser when i try to access a particular page.This error originates in MicrosoftAjax.js file.
Any help would be deeply appreciated.
Thanks.
Your problem may be that the code is trying to access an HTML element that has not loaded yet.
To resolve this try wrap the code that is getting the errors in a jquery ready block if you are using jQuery:
$(document).ready(function () {
//Code that uses SWF/MicrosoftAjax here
});
or if you are not using jQuery:
window.onload=function() // fixed windows to window
{
//Code that uses SWF/MicrosoftAjax here
}
Use firebug to pinpoint the problem.
99%, the problem's origin is not swfobject.js but in some script that's loaded before it.

What does Firebug "XML cannot be the whole program" error message mean?

I just got this error message in Firebug. A google search reveals nothing but other mystified people! Does anyone have any idea what it means?
It's being indicated on the last line of this 3-line script:
<script>
g_BuildServer = "/";
</script>
If you put JavaScript in a js file (which I assume you did), do NOT put the script tags, put
g_BuildServer = "/";
only.
Otherwise, to the parser, you just provided an XML document as a script.
I got this error when using jquery $get with no data type attribute when it was retrieving html. I added the dataType parameter as "html" and it fixed the issue.
Happened to me too, just for having an empty script tag in the page. When I removed this:
<script src="" type="text/javascript"></script>
everything got back to normal..
I got the "XML cannot be the whole program" error because the server was returning an xml error message in response to a request for a javascript file. My case may be unusual, but here it is:
I had a servlet filter granting or denying access to server resources. If it grants access, you get the resource, otherwise, you get <filterResponse><Access_Denied/></filterResponse>. I had failed to add the javascript file to the list of resources you don't have to be logged in to access. So, when Firefox received an XML error message as the body of a javascript program, its complaint makes perfect sense.
I experienced this error when I had a comment in my javascript but it didn't start with a /*
it just had a few *'s hence creating a syntax error
Also you can get this error while you use jQuery.
In that case replace "$" with "jQuery"
It also happens, when you use jQuery's template plugin, and you place the markup in a script tag, but you forget to change the script tag's type attribute to 'text/x-jquery-tmpl'

Categories