Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I can't quite figure out why the server is not resolving the path to the js files.
Here is my code:
<head runat="server"> <title><umbraco:Macro Alias="PageTitle" runat="server"></umbraco:Macro></title> <!-- CSS --> <link href="~/CSS/Styles.css" rel="stylesheet" type="text/css" /> <!-- JS --> <script src="~/Scripts/jquery-1.3.1.min.js" type="text/javascript"></script> <!-- Meta Data --> <umbraco:Macro keywords="[$metaKeywords]" description="[$metaDescription]" Alias="MetaTags" runat="server"></umbraco:Macro></head>
What i get out is:
<html xmlns="http://www.w3.org/1999/xhtml" > <head><title>Title</title> <!-- CSS --> <link href="CSS/Styles.css" rel="stylesheet" type="text/css" /> <!-- JS --> <script src="~/Scripts/jquery-1.3.1.min.js" type="text/javascript"></script> <!-- Meta Data --> <meta name="keywords" content="" /><meta name="description" content="" /></head>
Can anyone explain what i'm doing wrong or why this is happening?
Thanks
Chris
Sorry, forgot got to put it's Umbraco 4.5.2 running on IIS6.
Chris,
There is issue with using head runat server if you take that out it should work do you need the runat server?
Regards
Ismail
Thanks for the reply but why does it resolve the CSS files and not the javascript one?
If i remove the runat="server" tag from the head it then doesn't resolve any of them even if i put runat=server on the css file.
This is no doubt in your master template so you dont need the ~ and it should then resolve?
Ismial
Ahhh i understand now.
Thank you!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Script tags not resolving path correctly in head.
Hi,
I can't quite figure out why the server is not resolving the path to the js files.
Here is my code:
<head runat="server">
<title><umbraco:Macro Alias="PageTitle" runat="server"></umbraco:Macro></title>
<!-- CSS -->
<link href="~/CSS/Styles.css" rel="stylesheet" type="text/css" />
<!-- JS -->
<script src="~/Scripts/jquery-1.3.1.min.js" type="text/javascript"></script>
<!-- Meta Data -->
<umbraco:Macro keywords="[$metaKeywords]" description="[$metaDescription]" Alias="MetaTags" runat="server"></umbraco:Macro>
</head>
What i get out is:
Can anyone explain what i'm doing wrong or why this is happening?
Thanks
Chris
Sorry, forgot got to put it's Umbraco 4.5.2 running on IIS6.
Thanks
Chris,
There is issue with using head runat server if you take that out it should work do you need the runat server?
Regards
Ismail
Thanks for the reply but why does it resolve the CSS files and not the javascript one?
If i remove the runat="server" tag from the head it then doesn't resolve any of them even if i put runat=server on the css file.
Thanks
Chris
Chris,
This is no doubt in your master template so you dont need the ~ and it should then resolve?
Regards
Ismial
Ahhh i understand now.
Thank you!
is working on a reply...