We have moved a lot of images and javascript file that was inside class to external Javascript file. In development (Debug inside Visual Studio), everything look nice, all images show, all javascript works and all CSS display perfectly. When we do a package and install with IIS ina virtual directory everything that is pointed by the JavaScript doesn't work.
Question : Since we cannot use the tilde (~) in javascript or in CSS what is the way to display those resources?
Edit 1
The problem is the website is installed with a Virtual Directory and if we have in the JavaScript file a popup that has a hardcoded path in the JavaScript the code try to display : "http://localhost/NameSpace/Directory/File.html" instead of "http://localhost/VIRTUALDIRECTORY/NameSpace/Directory/File.html". Is there a configuration with IIS or inside the code I need to add something like a parameter to pass the path everytime?
In the javascript in dev it work to have something like :
var popWindowPath = '/ProgressFile/Simple/ProgressSlow.htm';
Images for css are, I believe, displayed relative to the css file so that shouldn't be an issue (use relative rather than absolute links).
For the js, either have the ability to pass a base link in as an argument or make .js files parsed as .net pages and include code on those pages.
Related
How to use a free bootstrap template (e.g., from startbootstrap.com) in meteor. I mean where the resources- html file, css folders and js folders of the free template should be put and what packages are needed to add/remove in meteor project file? I have tried it several times but got errors and the program crashes each time. I also transfer the script and link tags from section to section, but it did not work.
Just add the css of the template to the client of your Meteor project. Also, try using the nemo64:bootstrap package for Bootstrap. This will add some files to your project automatically, one of which will say is editable at the top. You can put your custom css in that file.
You can put the relevant html, css, and js files anywhere on the client. (Sticking it inside a folder called client will do that).
Image and font files should go in a folder called public.
You will need to make meteor templates from the HTML files. As is they will be missing any <template name="foo"> tags.
The css files can go anywhere under /client and they will automatically be added to the project. These are the easy ones.
The js files are the harder ones. If you put these under /client they will be wrapped by Meteor and will not have global scope. In all probability they won't work at all. You can put them under /public and modify your head.html file to include them to get around that problem. Odds are there won't be very many js functions in the free template anyway so you might want to read through them and see which ones you really need and then convert those to be proper template helpers or global functions on the client.
I have actually done this before but I can not remember how to get this right. Does anyone know the proper setup or of a tutorial that explains how to set this up without a plugin?
Getting Adobe Edge Animations to work in WordPress (or any other CMS)
I just did this myself, and posted an article on Codepen about it; http://codepen.io/write/getting-adobe-edge-animations-to-work-in-wordpress
I've also opened up an issue over at Github; https://github.com/wittnl/Edge-Animate-Runtime/issues/3
The problem
When EA (Edge Animate) is looking for assets they use relative paths.
This becomes a problem when we're using WordPress, where we need to reference our theme folder, an absolute URL.
ERROR 1
The main file edge.x.x.x.js fails loading the right javascript file for the composition. Resulting in a 404, file not found.
ERROR 2
The composition specific javascript file that get's loaded by edge.x.x.x.js have relative paths to images etc. Resulting in that no images are loaded.
What we want
Have all our assets stored in our theme folder
Have all files load properly and enjoy our animations
The solution
1) Modify the main javascript file
Make your own version of the main javascript file, e.g; edge.5.0.1-edited.js
Check for comp.load and change it so that it loads from our theme folder correctly.
comp.load('/wp-content/themes/my-awesome-theme/assets/edge/' + projectPrefix + "/" + projectPrefix + "_edge.js");
2) Modify the "composition"-specific javascript file
Change the variables you need to change (e.g images) inside tools_edge.js so that it points to your theme folder.
var im='/wp-content/themes/my-awesome-theme/assets/edge/tools/images/'
I have a designer who makes the design for me and I want to start with CodeIgniter.
But the problem is to place the CSS and images file. I can put them in the root of the application but it is not supported in IDE (DW).
What I mean is the path is not working in DW to show CSS styling in live view and my designer can't make change without seeing styling.
I would also like to enable the intellisense feature on DW if possible.
Any help will be helful. Thanks.
You shouldn't rely on DW. The quickest thing you can do is to render him a HTML page which he can open and edit and DW, and then just copy the CSS changes to your CI project.
I always save CSS files in the root directory. That way, I can quickly access them using the shortest of paths inside CI's URL helper functions.
Such as...
echo site_url('css/style.css');
The web design company I work for has a development side, and a published side for their client sites. For dev sites, the CSS is stored in a directory such as /software-1.5/templates/099/themes/theme-name/theme.css with PIE.htc stored in the same directory. The index page (and all other pages) are stored in the /software-1.5/ directory. However, once the site is published, the templates/099/... part will change to something else.
When I use behavior: url('PIE.htc') in my theme.css file, IE7 apparently tries to find the HTC file in the base directory, and not the CSS directory. How can I make IE7 look for the PIE.htc file in the same directory as the CSS?
Maybe it does help if you're setting the behavior not within the CSS but within the HTML page in the head section. I don't know of a possibility to make IE use the path of the CSS.
I have a custom asp.net control. That control will also render to the page a piece of javascript. This javascript piece of code is actually properties that have to be initialized. One of this property value must be a path. This path is a directory that is inside this assembly. If it is was a file i would use GetWebResourceUrl but now I don't know what commands to use.
Also I would like to know, if I get the dir path the files inside it will be available for the javascript to use them or not?
Try this: System.Reflection.Assembly.GetExecutingAssembly().Location