I have a banner in which the HTML is loaded into my file via:
<?php require("banner.php"); ?>
When I attempt to load my page via SSL (https://vantagewebservices.com/) the banner does not load. Chrome and FF are warning me that some of my scripts are not being loaded over SSL. However, the links in the HTML are all dynamic in the way that they are link via the root of my website and not by the domain. The banner.html file that is loaded into my index page can be found here: vantagewebservices.com/banner.html. If you can help me resolve this issue I would greatly appreciate it.
Some of your scripts are not loading via https, change the following lines to be protocol relative as mentioned by #Ennui below.
<link href='//fonts.googleapis.com/css?family=Droid+Sans' rel='stylesheet' type='text/css'>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js"></script>
The main problem is that JQuery was not loading which your banner is dependent on.
Related
i have a php codeignitor php app which was working fine on localserver xampp but when i uploaded that app on a live server, its not loading assets, images and also not submitting the login form. When see the source for login page, it shows urls like this
<link href="<?=base_url()?>assets/css/bootstrap.min.css" rel="stylesheet">
<link href="<?=base_url()?>assets/css/datepicker3.css" rel="stylesheet">
<link href="<?=base_url()?>assets/css/styles.css" rel="stylesheet">
also the form action shows like that
<form action="<?=base_url()?>auth/login" method="post">
i have tried every thing url helpers and all that stuff but still unable to fix it.
Sorry if is too obvious, but I assume that you have the url helper loaded in your autoload, right?
I have a problem with my Wordpress template built with use of Bootstrap - scripts do not work, e.g. dropdown menu... I am sure that I'm doing everything right according to the instructions. But I do not know why my Bootstrap want to load "assets" folder though in that version (3.1.0) there is no such folder.
Location of my theme folder with Bootstrap files in it looks like that:
http://localhost:8888/my-site/wp-content/themes/my-theme/
My console says:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://localhost:8888/assets/js/bootstrap-transition.js
http://localhost:8888/assets/js/bootstrap-alert.js
http://localhost:8888/assets/js/jquery.js
http://localhost:8888/assets/js/bootstrap-modal.js
http://localhost:8888/assets/js/bootstrap-dropdown.js
http://localhost:8888/assets/js/bootstrap-scrollspy.js
http://localhost:8888/assets/js/bootstrap-tooltip.js
http://localhost:8888/assets/js/bootstrap-tab.js
http://localhost:8888/assets/js/bootstrap-popover.js
http://localhost:8888/assets/js/bootstrap-button.js
http://localhost:8888/assets/js/bootstrap-collapse.js
http://localhost:8888/assets/js/bootstrap-typeahead.js
http://localhost:8888/assets/js/bootstrap-carousel.js
In my style.css theme file I've got only information about author of theme and this line: #import url('css/bootstrap.min.css');
In turn, my header.php file contains only:
<link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet">
How are you loading the scripts? You indicate how you load the stylesheets, but not the scripts themselves. Often bootstrap templates like to include those in the footer.
I am developing a simple web app with Slim framework. I got stuck with a probably simple problem. I want to include static files (CSS and Javascript) into my template.
My project folder structure is as follows:
index.php //<=== where all the routing happens.
/flot
layout.css
jquery.js
....
/templates
first_template.php
My header of first_template.php contains:
<link href="../flot/layout.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="../flot/jquery.js"></script>
When I call the projects root url
http://localhost/xampp/ProjectX/
(I'm using XAMPP) the template shows up, but the css and javascript stuff is not working. The Google Chrome console shows:
GET http://localhost/xampp/ProjectX/flot/layout.css 404 (Not Found)
GET http://localhost/xampp/ProjectX/flot/jquery.js 404 (Not Found)
Any suggestions? I spent almonst one hour in googling, but the overall documentation of the Slim framework is still literally slim :)
I assume you are displaying your Template on the Project root (index.php), so you should remove the ../ from your Stylesheet and JS relative Paths:
<link href="flot/layout.css" rel="stylesheet" type="text/css">
<script language="javascript" type="text/javascript" src="flot/jquery.js"></script>
In Joomla 2.5 I have installed DirectPHP, which I have used extensively in Joomla 1.6 to embed PHP in Joomla articles. It works very well. I usually just for one include in the article, like this:
<?php
include "my_cool_script.php";
?>
Then I make my code in my_cool_script.php. One thing I often do is include more JS or CSS scripts in the page, right through the article, but putting the following lines in my_cool_script.php:
<link rel="stylesheet" type="text/css" media="screen" href="/scripts/css/dark-hive/jquery-ui-1.8.21.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/scripts/css/ui.jqgrid.css" />
<script src="/scripts/js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="/scripts/js/jquery-ui-1.8.21.custom.min.js" type="text/javascript"></script>
<script src="/scripts/js/i18n/grid.locale-en.js" type="text/javascript"></script>
<script src="/scripts/js/jquery.jqGrid.src.js" type="text/javascript"></script>
This has always worked in the past, with Joomla 1.6. Now in the Joomla 2.5 install. The rest of the PHP and HTML is loading in the article, and there aren't any errors on the page as far as loading the scripts. I look at the HTML code and I can see the above lines written to the page, but I cannot access any of the jQuery functions, like the script was not loaded. I get an error when I try to use any jQuery syntax. I know this script was working, because I just moved it from another site, running joomla 1.5 to the new one, 2.5.
Does anyone know anything about why the scripts aren't loading?
EDIT
Well i guess the script was loading, but it didn't like that used the $ symbol. I changed them all to jQuery and it works.
I am not sure exactly why, but perhaps in my installation there is some conflict, and the $ symbol is being recognized as it usually does, signifying that we are dong jQuery. So I changed all the $ to jQuery in my PHP scripts and all the jQuery seems to be working now.
Mootools (Joomla's javascript default framework until version 2.5) also uses '$', so it's very easy to run into some complications if you're unaware you're running scripts relying on both frameworks side to side.
Having said that, you could use 'jQuery' instead of '$' and release '$' for everyone else using the jQuery.noConflict(); command.
Cheers.
I have a strange problem with Yii & Jquery:
When I open a page which uses ajax/jquery on localhost Yii does automatically add asset include calls to the of the page:
<link rel="stylesheet" type="text/css" href="/PATH/assets/f72b359d/style.css" />
<script type="text/javascript" src="/PATH/assets/2e442e1a/jquery.js"></script>
<script type="text/javascript" src="/PATH/assets/2e442e1a/jquery.cookie.js"></script>
However when I run same code on the server Yii does not do it hense no Jquery available.
I'd appreciate if someone could direct to a way to solve it.
It seems like you're not registering jQuery in the correct way. You must add the following line in /protected/views/layout/main.php before </head> tag:
<?php Yii::app()->clientScript->registerCoreScript('jquery'); ?>
It will load jQuery automatically. Remember, if the YII_DEBUG flag is on it will load non-minified version, when deactivated (on production) it will load minified version. Hope this will fix your problem.
If all is working on your local machine it might be a permission problems
Have you checked that /assets is writable on your server ?
Yii publishes the assets it needs at runtime in this directory