|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Creating variables in real time to pass to URL
I am creating a scheduling web page, and what I am trying to do is bring up a window of current scheduling once a person enters the scheduling date to see what time slot is available.
I am using a javascript calendar which assigns the date selected to a form input field. Next to it I want to put a link that points to the current schedule for that date. To do that I'm trying to pass the value of the date input field through URL to the scheduling page. What is the easiest way to do that? Or is there a better way to do this? |
|
#2
|
|||
|
|||
|
If you already have the date in a form field, why not just post the form to the server?
However, if you need it in a URL then, you'll have to write Javascript that constructs the URL before you send the URL request to the server. |
|
#3
|
|||
|
|||
|
If the only thing in the form was the date then passing the variable to a form would be fine. However the site is basically a scheduling of tech work. The whole form has other fields and I am trying to prevent having to hit the back button to have to change the date if the current date is full.
My biggest issue is populating the calendar day from a database while in the javascript. If there was an easy way to do that then I could use javascript from the same page and just use the value assigned to the field through javascript. So if you have any ideas on that, that would be great. Thank you |
|
#4
|
|||
|
|||
|
What about using CF to generate a Javascript array that contains all of the "full" days. Then when the user picks a day you can check it against the array and if there is a match, display a message telling them that day is already taken.
Unless you send the info about which days are taken to the client along with the calendar, I don't see how you can check the date without a round trip to the server (which means using the back button or redirecting them back to the calendar form). |
|
#5
|
|||
|
|||
|
Thank you kiteless.
I think I will have to redesign the page to be able to do that, because it seems that sending the date to a form would be faster and easier to code. Thanks again |
|
#6
|
|||
|
|||
|
To prevent any more responses, I have decided to add a link that would open up a window with the current months schedule, so the user can select the date after viewing the calendar. This would not interfere with the form and provide the information needed.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ColdFusion Development > Creating variables in real time to pass to URL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|