Jump to content

Custom Page creates fine however weird issue.


Zanven

Recommended Posts

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.

Link to comment
Share on other sites

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 by Zanven
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated