Zanven Posted January 10, 2012 Share Posted January 10, 2012 hi. i succesffuly have multiple custom pages. for my template im making. to integrate with whmcs. however for some weird reason. the scripts i load in the header.tpl only work in index.tpl. and wont run in about.tpl or any other tpl. even if i put them in the tpl itself. no scripts run on any page other then the index. if any code is needed or ideas as to why this is. let me know. thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted January 10, 2012 Share Posted January 10, 2012 Please paste the contents of your header.tpl and the code that will not work properly. 0 Quote Link to comment Share on other sites More sharing options...
Zanven Posted January 11, 2012 Author Share Posted January 11, 2012 (edited) Please paste the contents of your header.tpl and the code that will not work properly. was waiting for my post to be validated by a mod but i guess thats not going to happen. i started messing around with dumping this code in .tpl files {literal} <script type="text/javascript"> jQuery(function(){ alert("test"); }); </script> {/literal} the pop up box only works if it is in index.tpl or header.tpl or footer.tpl none of the custom pages work for it except for index which i find weird. if it was none of them then id know something is wrong in my header. but the main page works. edit: heres the header dumped it in pastebin. http://pastebin.com/NCs4Ngju Edited January 11, 2012 by Zanven 0 Quote Link to comment Share on other sites More sharing options...
Sitepearl Posted January 11, 2012 Share Posted January 11, 2012 Did you try clearing your templates_c folder? 0 Quote Link to comment Share on other sites More sharing options...
Zanven Posted January 11, 2012 Author Share Posted January 11, 2012 Did you try clearing your templates_c folder? no i had not. i tried it and no success still no scripts running on other pages. any other ideas??? 0 Quote Link to comment Share on other sites More sharing options...
Zanven Posted January 11, 2012 Author Share Posted January 11, 2012 i worked out what was causing it. i had my scripts like the following. as i simply copy pasted out of the basic html website im porting. <script language="javascript" type="text/javascript" src="filepath/script.js"></script> doing this causes no javascript code to work on any pages other then the index page. to fix it i simply looked at the whmcs default script calls and changed mine to look like them and woola it fixed it. <script src="filepath/script.js"></script> that was a nice use of 3 hours or so reading everything working out wtf i was doing wrong while working on other stuff. major facepalm. oh well its all in the learning i guess it happens when ur learning php, js, html, css on the fly, on a need to know basis lol. 0 Quote Link to comment Share on other sites More sharing options...
Sitepearl Posted January 11, 2012 Share Posted January 11, 2012 Learn something new every day 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.