quick cry for help: this website "broke" somehow and is stuck in the pre-loader
https://thelosertakesitall.com/ – I want to understand why and how to fix it, thank you!
I tried removing the elements displaying the loader but then it just stays at a blank screen. I understand the code is old and was set up by someone I do not have contact to anymore.
jQuery is not loaded because of:
Mixed Content: The page at 'https://thelosertakesitall.com/' was
loaded over HTTPS, but requested an insecure script
'http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js'.
This request has been blocked; the content must be served over HTTPS.
try to change
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <!-- Load jQuery library -->
to
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> <!-- Load jQuery library -->
Related
I've a problem with my website, the layout load properly (and CSS) but no JS and page in yield.
I've copy paste the layout of my other website, inclued tje JS and CSS file, I do not understand why it does not work while on other sites it's good..
Code for include the JS and CSS file: <script src="{{url('js/jquery.min.js')}}"></script>
As you can see, the page is empty, and this is not normal.
Image of error:
Ahh... ok.
I've forget to DL From:: into my project. Sorry
I had the same problem when I was creating a recent Laravel project however mine was narrowed down too 2 problems. 1 being the JS had an error and 2nd was the way I called it.
I fixed it by doing the following:
<script type="text/javascript" src="{!! asset('js/jquery.min.js') !!}"></script>
I have a C# MVC app that makes use of recaptcha security code in a particular view.
In my view i have the following code:
<script type="text/javascript" src="https://www.google.com/recaptcha/api/js/recaptcha_ajax.js"></script>
...
#Html.Raw(Html.GenerateCaptcha("captcha", "white"))
#Html.ValidationMessage("captcha")
When i try to load the page, i get the following error in chrome's debugger:
Mixed Content: The page at 'https://mywebsite.com' was loaded over HTTPS, but requested an insecure resource 'http://www.google.com/recaptcha/api/challenge?k=mykey'. This request has been blocked; the content must be served over HTTPS.
and if i inspect the source of the loaded page, the razor control for recaptcha generates this script tag:
<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=mykey">
the src attribute is a http url not a https url.
If anyone knows how i can overcome this error, it would be greatly appreciated.
Thanks,
Kapetanios
Ok here i am posting an answer to my own question again.
It turns out that this:
#Html.Raw(Html.GenerateCaptcha("captcha", "white"))
#Html.ValidationMessage("captcha")
was rendering this:
<script type="text/javascript" src="http://www.google.com/recaptcha/api/challenge?k=mykey"></script>
The src attribute of the script tag contained http and not https
So, to fix this issue, i just replaced the #html.raw & #html.validate with this:
<script type="text/javascript" src="https://www.google.com/recaptcha/api/challenge?k=mekey"></script>
<noscript>
<iframe src="https://www.google.com/recaptcha/api/noscript?k=mykey" height="300" width="500" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea><input name="recaptcha_response_field" value="manual_challenge" type="hidden" />
</noscript>
Doing this stopped chrome debugger from getting the error.
is there any reason for something to work in page inspector and not in real debug mode?
In particular I'm using fullcalendar.min.js (JQuery plugin) in some tab content and I see it very well in page inspector but when debug the calander is not shown..
in header:
<link rel="stylesheet" href="./../../Content/fullcalendar.css" type="text/css" media="all" />
<script src="./../../Scripts/js/fullcalendar.min.js"></script>
in body:
<section class="tab events-tab">
<section class="events-tab-inner">
<div id="calendar"></div>
</section>
</section>
in console of the web page loading I have the below errors (I'm not sure they are directly related to my calendar thing):
GET http://localhost:3516/SITE/css/images/star-off.png 404 (Not Found) jquery.min.js:2
Invalid App Id: Must be a number or numeric string representing the application id. all.js:56
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.min.js:3
FB.getLoginStatus() called before calling FB.init(). all.js:56
GET http://localhost:3516/SITE/css/images/star-off.png 404 (Not Found) jquery.min.js:2
Based on your console output that you've included above, it seems that there are a few errors. Not sure why they would work in page inspector and not debug though. It seems like it should be breaking everywhere. Let's approach each error one by one:
1. Invalid Image Paths
It appears that you may be using jQuery UI for some features within your code. The jQuery UI suite contains images located in the /images directory when you download the .zip file that the CSS references as background-images. These images are expected to be nested on directory in from the location of the CSS file. For example,
[CSS Directory]
-> jquery-ui.min.css
[images]
-> star-off.png
-> ...
-> etc.
The only way to change this structure is to modify the relative urls within the minified jQuery UI CSS file.
2. Facebook JavaScript SDK error
I have never personally used the Facebook JavaScript SDK. However, that is what it appears you are using. From the error it sounds like you never initialize the Facebook object via FB.init() before you call FB.getLoginStatus(). Try this:
<script type="text/javascript">
/* Locate your FB.getLoginStatus() call and place FB.init() before it */
FB.init();
FB.getLoginStatus();
</script>
Other than that, you may need to refer to their documentation for how to properly initialize the FB object for use.
Hope this helps. Good luck and happy coding! :)
I have an aspx page that has an iFrame in it, I set the src attribute of this iFrame in the page load event.
The page that gets loaded into the iFrame has its own references to its own stylesheets and javascript files, but when the page loads, it tries to locate these files with a path from the parent page.
Example structure:
/application/example/parentpage.aspx
/application/iframepages/iframepage.html
/application/iframepages/css/iframepagecss.css
/application/iframepages/scripts/iframepagescript.js
With the iframepage.html containing the following lines:
link rel="stylesheet" href="css/iframepage.css" type="text/css"
script type="text/javascript" language="javascript" src="scripts/iframepagescript.js"
The problem seems to be when iframepage.html loads in the iframe on parentpage.aspx, it tries to load the css file from the path application/example/css/iframepagecss.css and likewise for the javascript it tries to load it from application/example/scripts/iframepagescript.js.
This only happens in Firefox, it works fine in IE, Chrome and Safari. Thoughts?
Thanks in advance.
Looking at AJAX and Relative Path Scope you can try to use the BASE HREF tag, or otherwise use absolute paths instead.
I've got an iframe application that's working fine and rendering fbml in facebook. But the whole app is built using ajax calls to load large chunks of pages. Several of these have < fb: tags that aren't being rendered when they load. I tried the code below, which is then loaded into a div in my index page, but it doesn't show anything at all, no html, no fb rendering, nothing. Can someone please tell me what I'm missing?? Thanks so much!!
<script src="http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php" type="text/javascript"></script>
<fb:serverfbml style="width: 600px;">
<script type="text/fbml">
<fb:fbml>
<!-- all of my html and my php and my fb tags go in here, for example: -->
<fb:name uid="my_real_user_id" useyou=\"false\"></fb:name>
</fb:fbml>
</script>
</fb:serverfbml>
I hope my question was clear. If not, just let me know I'll explain in more detail! :P
have look at this question
Loading Facebook fb:profile-pic via AJAX in Facebook Connect site