retreive values comming from a javascript

Hi Experts,

I've found a clalendar script that is doing exactly what I need.
But I don't understand how to retreive the selected values. Normaly in classisc ASP I use
something like

Request.Form("examplefield")

Open in new window


The script beneath is a sniplet of a bigger file from Github:

https://github.com/victorwon/calendarxp/blob/master/FlatCalXP/demos/Financial445Demo.htm
function submitByDates(fm) {	// construct the selected dates in the hidden form field allSelected
	var dl=document.getElementById("dateList");
	var dateItems="";
	for (var i=0; i < dl.length; i++) {
		if (i>0) dateItems+=",";
		dateItems+=dl.options[i].text;
	}
	// fm.action="ByDate.php";
	alert(dateItems); // in your app you should call fm.submit() instead so that the allSelected.value can be submitted.
}

Open in new window


Can someone please help to reteive these values captured in the form in classic ASP?
LVL 1
SteynskAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
The good news is when you click a calendar and get the pop up then select a date, it throws thd data in the form text box.  At least that is what I see here http://www.calendarxp.net/tt_pop.shtml

Once the data is in the form text box, you will retrieve it as normal with your request.form once you click the form submit button.
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
That calendar script is old as it references ie5.5  I had a hard time using it on chrome browser in the month view http://www.calendarxp.net/scripts/MockupSibling/dhtmlgoodies-week-planner.php?initDate=2013-10-13

I have been using fullcalendar http://arshaw.com/fullcalendar/ for my projects and it works nicely.  There is a learning curve with any of these if you are not used to javascript or jquery.

The key thing to remember is your asp code runs before the page is even rendered on the server (asp is a server side language).  Javascript/jquery is typically a client side language meaning it runs on your computers browser after the page loads.  

This means you can use your asp to add data to javascript/jquery if needed, but not the other way around.
0
SteynskAuthor Commented:
Dear Padas,
THank you for your quick response. I know the ASP is server based but the script still functions in the, by the ASP generated, HTML output . And klicking the dates makes the dates appear in my multiple select box.

Is there no way I can post these valus to my post proccessing code?

And yes the code is older but I don't have problems in Chrome. And I could not find a year view of the fullcalendar script. I need to be able making selections in a full year view.

Kind regards
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
It was the full month calendar I had an issue with. I can see it, but editing was a problem.

With fullcalendar, you can do a year view simply by making 12 small month calendar.

To answer your question about submitting the date chosen, when you use the pop up calendar for instance, you click on a date and the date is populated to the form field.  I am looking at this sample http://www.calendarxp.net/tt_pop.shtml.  From there, you just submit your form as normal.  

In the first example of the link I just provide, the form field is
<input name="startDateCtrl" value="" size="11" maxlength="8" class="plain" alt="start date">

Open in new window

Since the name of the field is startDateCtrl, you would access it with request.form("startDateCtrl").

Maybe you should just build yourself a sample page of how you would use this and provide a link and we can get to more real life example.



Another option is jquery ui calendar.
Default as a pop up http://jqueryui.com/datepicker/
Display inline without pop up http://jqueryui.com/datepicker/#inline
Multiple Months http://jqueryui.com/datepicker/#multiple-calendars

I have not looked through the code of the calendar you chose, but the reason I suggest fullcalendar or jquery ui calendar is because they are going to target modern browser and they also have a more up to date look.  They are similar to  calendarxp as they are generated by js.  

With any of these, the calendar is generated by js and your data to fill the calendar such as events is going to be via your asp code.  With calendarxp, it looks like you use xml.  With the others you can use json as well.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
SteynskAuthor Commented:
Thanks Padas,

I've got a working jquery UI cript supporting multiple selects. It works very smoothly.

Kind regards,
0
Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Great to hear! I am glad you have a good solution.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.