View Single Post
  #5 (permalink)  
Old 01-25-06, 08:17 AM
toth toth is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
It's no forum, it's more like a blog. The administrator has the option to choose when the post is displayed. This way the admin can make posts for the upcoming week. So he's got the option to choose which date en which hour the post needs to be displayed. The blog only show's the post from the current date. When the admin sets the day or hour to one in the future it automaticly comes in the concepts. The post will then be displayed when the date and time is now.

I'm also using a javascript function to get the dates from the fields

<form ACTION="<%=MM_editAction%>" METHOD="POST" name="form1" onSubmit="GetDate()">

the javascript GetDate():

<script language="JavaScript">
<!--
function GetDate() {
document.form1.PostDate.value = document.form1.u_day.value + '/' + document.form1.u_month.value + '/' + document.form1.u_year.value + ' ' + document.form1.u_time.value;
}
//-->
</script>

maybe I'm doing something wrong here

and the variables
<%
u_date=request.form("u_date")
u_month=request.form("u_month")
u_day=request.form("u_day")
u_year=request.form("u_year")
u_time=request.form("u_time")
%>

If I choose 'edit post' the hour comes correct in the dropdown list, but when I choose update, even when I leave the current hour selected, it removes the hour in the DB date field, only the date get's updated and the time is deleted.
Reply With Quote