Situation:
We open the first fancybox where the user fills in basic data like date , time, location.
After that post we open a 2nd fancybox window that allows the user to fill in some details. Like amount, groupname , e-mail etc. We autmaticly create other hours when the amount is above 15 and 30 when the location = X , 30 and 60 when the location = Y.
But if that amount is above the max allowed on a day. It needs to open a 3rd fancybox that allows the user to fill in an extra date for the other persons.
Question:
The question is how do I let the fancybox open when the amount field of the 2nd fancybox is higher as a certain number. That certain number depends on a field on the first page.
Code:
function closeFancyGroepAndIndi() {
$.fancybox.close();
// this would always open that page
// $.fancybox({
// 'type': 'ajax',
// 'ajax': { cache: false },
// 'href': ResolveUrl('~/Groep/CreateDouble')
// });
// reloads the main tables. This should only be the case when the amount is not higher.
$("#reservationList").load(ResolveUrl('~/Reservation/reservationList'));
if ($("#indexGroep") && $("#indexIndividual")) {
var id = $("#reservationId").val();
$("#indexGroep").load(ResolveUrl('~/Reservation/groepList'), { reservationId: id });
$("#indexIndividual").load(ResolveUrl('~/Reservation/individualList'), { reservationId: id });
}
Thoughts so far:
I thought to check for the value in the in the 2nd page it’s javascript but then I have to give the value in 3rd fancybox to a hiddenfield.
the checking of the values will happen with.
leftOverAmount = $(‘#AmountHidden’).val(); and maxAmount = $(‘maxAmountHidden’).val();
So how do I get that location of my first page in the 2nd page his javascript?
Because I use this value in more than one place. It was already defined in my web.config
So I use this in my view
and call the appSetting from my partial view. And also changed the idea of an extra popup it was way to much. So now I’m going to show and hide fields when the amount is > maxAmount.