JS file not loading for block
PermalinkIt is located at /blocks/search/templates/form_only/view.php
Along with that custom template is a css and js file which are names view.css and view.js respectively and are both located in the directory /blocks/search/
The css file is loading up ok but not the js file.
Have I done anything that is obviously incorrect?
I am running the block out of global scrapbook and calling via hardcode in my theme header template
As your search block is going to feature in your theme, why not rename your view.js put it in your theme and call that directly too? Come to think of it your view.css would probably benefit too - place the css in the main.css file of your theme. One less web request to make!
Hope that helps
The CSS is now included in my main.css. Haven't had any joy getting the JS to load from my theme tho'. I tried naming it auto.js and putting in the theme root - no joy. Also have tried putting into js directory in my theme with similar result.
I am still learning the nuts and bolts of this system having used a CodeIgniter CMS extensively in a previous life.
Then include it in your theme header
<script type="text/javascript" src="themes/yourthemename/yourjavascript.js"></script>
That should do it.
Ollie
Ta Ollie.
/blocks/search/templates/form_only/view.js
/blocks/search/templates/form_only/view.css
Hope that helps