Can some one help, I have a calender script and also a twitter helper. when I run these from the root of my site in web matrix no problem, if I then try and run the scripts from a members area i.e you have to login to access files dont run. Can some one
explain how I do this thought by default secure members would have access to everything on my site. Please help
There's no reason why they should not work just because you have to log in to get to the page that they are on. Can you provide more detail on the issue? Do you get errors?
It's probably a problem with how your reference the scripts. If you are using WebMatrix 2, place ~/ in front of the urls in your scritp and style sheets src:
Thanks again I have done the above and now works a treat, nice to have a trained eye. I am using WebMatrix 2 but that worked thanks again. P.s Any ideas for a Java Clock once forms complete will need to display clock, real time.
Espace
Member
2 Points
29 Posts
Unable to make helpers and scripts run in Members area, user login
Jun 19, 2012 12:55 PM|LINK
Can some one help, I have a calender script and also a twitter helper. when I run these from the root of my site in web matrix no problem, if I then try and run the scripts from a members area i.e you have to login to access files dont run. Can some one explain how I do this thought by default secure members would have access to everything on my site. Please help
Mikesdotnett...
All-Star
154830 Points
19854 Posts
Moderator
MVP
Re: Unable to make helpers and scripts run in Members area, user login
Jun 19, 2012 12:57 PM|LINK
There's no reason why they should not work just because you have to log in to get to the page that they are on. Can you provide more detail on the issue? Do you get errors?
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Espace
Member
2 Points
29 Posts
Re: Unable to make helpers and scripts run in Members area, user login
Jun 21, 2012 10:56 PM|LINK
helper works but following calender with time only works from root, why?? tried in public and login folder no joy
script src="Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
script src="Scripts/jquery.dynDateTime.min.js" type="text/javascript"></script>
script src="Scripts/calendar-en.min.js" type="text/javascript"></script>
link href="Styles/calendar-blue.css" rel="stylesheet" type="text/css" />
<script type = "text/javascript">
$(document).ready(function (){
$(".Calender").dynDateTime
({
showsTime: true,
timeFormat: "12",
// ifFormat: "%Y/%m/%d %H:%M",
ifFormat: "%a %d/%m/%Y %l:%M %p",
daFormat: "%l;%M %p, %e %m, %Y",
align: "BR",
electric: false,
singleClick: false,
displayArea: ".siblings('.dtcDisplayArea')",
button:".next()"
});
});
</script>
Espace
Member
2 Points
29 Posts
Re: Unable to make helpers and scripts run in Members area, user login
Jun 21, 2012 11:11 PM|LINK
<p><label for="PickUpTime">PickUpTime:</label>
<input type="text" name="PickUpTime" readonly="true" class = "Calender" />
<img src="calender.png"/>
@Html.ValidationMessage("PickUpTime")
</p>
Sorry left this bit off but is from the form where trying to use calender, only works in root dir Is form wrong
Mikesdotnett...
All-Star
154830 Points
19854 Posts
Moderator
MVP
Re: Unable to make helpers and scripts run in Members area, user login
Jun 22, 2012 04:29 AM|LINK
It's probably a problem with how your reference the scripts. If you are using WebMatrix 2, place ~/ in front of the urls in your scritp and style sheets src:
<script src="~/Scripts/jquery-1.4.1.min.js" type="text/javascript"></script>
If you are using v1, use the Href helper:
<script src="@Href("~/Scripts/jquery-1.4.1.min.js")" type="text/javascript"></script>
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
Espace
Member
2 Points
29 Posts
Re: Unable to make helpers and scripts run in Members area, user login
Jun 22, 2012 02:17 PM|LINK
Thanks again I have done the above and now works a treat, nice to have a trained eye. I am using WebMatrix 2 but that worked thanks again. P.s Any ideas for a Java Clock once forms complete will need to display clock, real time.
Mikesdotnett...
All-Star
154830 Points
19854 Posts
Moderator
MVP
Re: Unable to make helpers and scripts run in Members area, user login
Jun 22, 2012 02:34 PM|LINK
Yep - Google: http://www.google.com/search?q=javascript+clock
Hold on - I posted code for one more than 5 years ago: http://www.mikesdotnetting.com/Article/32/Javascript-24-hour-clock
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter