NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: jari@softmade.fi on July 12, 2014, 03:23:46 AM
-
I want to make an on / off type of calendar.
The user presses a button on a calendar day and the program will make a database insertion or deletion. I can get this done, but how do I get an refresh calendar after pressing ?
Jari
-
I'm sorry Jari, I don't understand.
Are you using the built-in calendar controls? ie NetWebYear? or something else?
cheers
Bruce
-
Yes and my "Form" procedure just insert record if it not found and deleting record if it is found.
-
Here is example app made from Hotdates
The idea is that the user clicks on the days when he will participate in a conference
Regards Jari
[attachment deleted by admin]
-
Hi Jari,
I've got the example, but I'm not understanding what to do next. What am I looking for? What should I try and do etc?
Cheers
Bruce
-
Hi Bruce
I need something like this : http://www.topdreamweaverextensions.com/reservation-calendar / Example of a calendar with a reservation form, on a public site
I want the user to click on those days when he wants to transport.
Jari
-
Hi Jari,
Cool. So does your example attempt to do this at all? I'm trying to understand what you want me to do...
Have you attempted this at all? Have you made any progress? Are there specific things you're stuck on?
Clearly - I'm confused.
cheers
Bruce
-
My example just add one record per day when clikking wanted day.
That code is in UpdateConferences procedure:
if p_Stage=0
do openfiles
CON:StartDate= p_web.GetValue('_Date_')
set(CON:DateKey,CON:DateKey)
next(Conference)
if error() or CON:StartDate<>p_web.GetValue('_Date_')
CON:StartDate= p_web.GetValue('_Date_')
CON:Description='OK'
CON:DurationDays=1
add(Conference)
ELSE
delete(Conference)
if error()
stop(error())
.
.
do closefiles
.
That works but only problem is that I don't get the calendar refreshed after returning from Form-procedure.
Jari
-
Hi Jari,
I've played around with it a bit, and I think it's probably do-able - but I also think you're on completely the wrong track. Embedding that sort of code in a form - and especially in that position - is not "correct" and in the long run will probably break (and break other things.) You're thinking of the form in a very "windows" way, and the form doesn't work like that.
I think it's probably best to go back to the root problem you are wanting to solve - which is the user selecting a date. There's a "Date" Form field type for that - and that field has lots (and lots) of options - many of which you are probably not aware of. so the first thing I'd probably recommend is that you construct your form using a date field - and then perhaps we can discuss how you'd like the date field to behave vs how it behaves on your form.
So, in short, I'm not sure I'd use the NetWebYear as the starting point here. That's primarily for displaying data - the Date Form field type is primarily for capturing a date from the user.
(I understand it's not going to work like you have in mind, but let's start there and discuss it from there.)
cheers
Bruce
-
Thanks Bruce
I tried to use the form, because I really do not understand when the calendar is refreshing.
In this simple way I got so close to the target.
I agree that my mind is still the type of windows :)
Maybe I will try to solve this in some other way.
Jari