I've searched the threads on this group, and simply haven't found an answer
for my problem.
I've got a section of Javascript that takes a date element and changes the
output format. It works perfectly on my RSS feed, but I continually get
the dreaded 500 error in my article list content class.
Here is the story so far.. ;)
My users want to have a list of news articles that are basically links to
various media sources. And they want this list to be available as an RSS
feed. I've got that all working wonderfully, BUT there is a catch - isn't
there always?
On the list of articles, they want the date formatted as "Aug 22" only. So
I added to my Jscript code that converts the date/time element into valid
UTC format by adding a switch on the month. The results display correctly
in my RSS feed (I added it temporarily into the description content).
BUT no matter what I do, or where I place the PreExecute tags in my list
cc, it errors out.
I know that an easy fix would be to require the users have two date
elements to complete, but that is not an option. My users will complain
till they are blue in the face.
Any suggestions as to where I should place the tags?
Thanks - peg
code below
-----------------------------------------------------------------------------------------
<!IoRangeRedDotMode><!IoRedDotOpenPage><span class="reddotText">[<
!IoRangeNoEditMode>open<!/IoRangeNoEditMode><!IoRangeRedDotEditOnly>save<
!/IoRangeRedDotEditOnly> <!IoRangeNoEditMode>NewsLink Items<
!/IoRangeNoEditMode>]</span><!/IoRangeRedDotMode>
<table cellSpacing=3 cellPadding=3 border=0 sizcache="47" sizset="80">
<tbody sizcache="47" sizset="80">
<!IoRangeRedDotEditOnly><!IoRedDot_lst_NewsLinks><span
class="reddotText">[add/re-order/remove links]</span><br /><br /> <
!/IoRangeRedDotEditOnly>
<!IoRangeList>
<tr vAlign=top align=left sizcache="47" sizset="81">
<td vAlign=top width="10%">
<%
var newPressDate= new Date("<%std_DateTime%>");
switch(newPressDate.getMonth())
{
case 0:
monthdayOnly = "Jan " + newPressDate.getDate();
break;
case 1:
monthdayOnly = "Feb " + newPressDate.getDate();
break;
case 2:
monthdayOnly = "Mar " + newPressDate.getDate();
break;
case 3:
monthdayOnly = "Apr " + newPressDate.getDate();
break;
case 4:
monthdayOnly = "May " + newPressDate.getDate();
break;
case 5:
monthdayOnly = "Jun " + newPressDate.getDate();
break;
case 6:
monthdayOnly = "Jul " + newPressDate.getDate();
break;
case 7:
monthdayOnly = "Aug " + newPressDate.getDate();
break;
case 8:
monthdayOnly = "Sep " + newPressDate.getDate();
break;
case 9:
monthdayOnly = "Oct " + newPressDate.getDate();
break;
case 10:
monthdayOnly = "Nov " + newPressDate.getDate();
break;
case 11:
monthdayOnly = "Dec " + newPressDate.getDate();
break;
}
%>
<%=monthdayOnly%>
</td>
<td sizcache="47" sizset="81">
<!IoRangeRedDotEditOnly><a href="<%lst_NewsLinks%>"><%hdl_ArticleTitle%></a>
<span class="reddotText">[for editing only]</span><br><
!/IoRangeRedDotEditOnly>
<a href="<%std_ArticleURL%>"><%std_ArticleTitle%></a><br>
<em><%std_MediaSource%></em><br>
<%txt_ArticleBlurb%>
<br /><%txt_RelatedBlurb%>
</td>
</tr>
<!/IoRangeList>
</tbody>
</table>
<div class="clear25"></div>
--
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/reddot-cms-users/-/jHfQCfH2CPIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/reddot-cms-users?hl=en.