Jump to content

Nasty date question


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

Recommended Posts

Hi,

I think this is gonna be a nasty one. Using filemaker 4.1, in a database

I've two date fields, data_start and date_end. I use a website for our users

to access this database to have a look in the planning of radiostation, I

want them to be able to search on items running on a date they enter.

I allready do it in FM itself, by running a simple script, but that's no

solution to the web. Now I figured out I could create a textfield containing

all dates from date_start 'till date_end. So, by searching on that

textfield, FM comes up with all records 'running' on the requested date. The

question is : how.......

If anybody could help ??

Cheers,

Andr

Link to comment
Share on other sites

Not a problem. The solution is to do a compound search of both the date_start and date_end fields. You want to take the search date and search for 'date_start...' and '...date_end'. The easiest way to take a single date entered on a form and place it in 2 fields for the search is javascript.

Here's a quick stab at what you'll want in your page:

<head>

<SCRIPT LANGUAGE="JavaScript">

function setDates(){

document.search.date_start.value=document.search.search.value+"...";

document.search.date_end.value="..."+document.search.search.value

}

</script>

</head>

<body>

<form name="search" onSubmit="setDates()">

<input type="hidden" name="date_start" value="">

<input type="hidden" name="date_end" value="">

Search date: <input type="text" name="search" value="" size=10>

</form>

<body>

Link to comment
Share on other sites

This topic is 8390 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.