Jump to content
Server Maintenance This Week. ×

Displaying Records Greater Than a Certain Date


This topic is 8301 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Hi, This is my first wack at a web database. I have a list of social events. I want the web users to see only the upcoming events not any that have already happened. I have done this locally but can't seem to figure it out for the web companion. My fields are "date", "time", "location" etc. I also have a "flag" field that I use to find the needed records locally. Thanks in advance for any info.

Dan crazy.gif" border="0

Link to comment
Share on other sites

Insert this javascript into the head portion of your page, call the showIt function on load in the body tag <body 0nLoad="showIt()"> and it put the current date and 3 dots in the date field (can be hidden). You will need to name your form.

<script>

function SystemDate(){

//current system date

var time=new Date()

var x=time

var dd=x.getDate(); (dd<10) ? dd="0"+dd : dd

var m=x.getMonth();

var yy=x.getYear();

var mm=m+1; (mm<10) ? mm="0"+mm : mm

var yyyy=yy+1900; (yyyy>3000) ? yyyy=yy : yyyy

SD= mm + "/" + dd + "/" + yyyy;

return SD

}

function showIt(){

document.myForm.date.value = SystemDate()+"..."

}

</script>

Link to comment
Share on other sites

This topic is 8301 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.