Hi to all !
Is there a way to reduce the number of checkboxes clicked by a person?
I've tried with js, and it didn't worked.
This is the code I've inserted into booking-calendar.php:
<script type="text/javascript">
$(window).load(function(){
var SlotCheck = $("#selected_slots input[type='checkbox']");
SlotCheck.click(function()
{
if (SlotCheck.filter(":checked").length > 3)
$(this).removeAttr("checked");
});
});
</script>
checkboxes
Moderator: General Moderators
Re: checkboxes
"Reduce the number of checkboxes clicked"? How? What do you even mean by that? Do you know what the user wants to click ahead of time?
Re: checkboxes
The question was posted here "ajax availability calendar help" for this subect:
http://www.devnetwork.net/viewtopic.php ... 6&start=30
but now I see that it was moved here.
In this context, you can't understand the meaning of the question.
http://www.devnetwork.net/viewtopic.php ... 6&start=30
but now I see that it was moved here.
In this context, you can't understand the meaning of the question.
Last edited by requinix on Thu May 05, 2016 12:30 am, edited 1 time in total.
Reason: removing sid from url
Reason: removing sid from url
Re: ajax availability calendar help
I've tried to localize the name of the month with:
$locales = array('ro.utf-8', 'ro_RO.UTF-8', 'ro_RO.utf-8', 'ro', 'ro_RO', 'ro_RO.ISO8859-2');
setlocale(LC_TIME, $locales);
<td align='left'><a href='?month=" . strftime("%m",
<td colspan='5' id='center_date'>" . strftime("%B %Y",
<td align='right'><a href='?month=" . strftime("%m",
and it worked. Probably there is some other solution but I haven't tried.
When I've tried to localize the name of the day, it didn't worked.
If you set:
public $day_closed = array("Monday"); to public $day_closed = array("Luni");
and
public $day_order = array("Monday",....), to public $day_order = array("Luni",....)
it changes to available day when you can make bookings. It doesn't recognize the name of the day.
Previously I've asked a question on how to limit the number of checkboxes clicked, but it was moved from here. So, I've tried this in booking-calendar.php:
<script type="text/javascript">
$(window).load(function(){
var SlotCheck = $("#selected_slots input[type='checkbox']");
SlotCheck.click(function()
{
if (SlotCheck.filter(":checked").length > 3)
$(this).removeAttr("checked");
});
});
</script>
It didn't worked.
$locales = array('ro.utf-8', 'ro_RO.UTF-8', 'ro_RO.utf-8', 'ro', 'ro_RO', 'ro_RO.ISO8859-2');
setlocale(LC_TIME, $locales);
<td align='left'><a href='?month=" . strftime("%m",
<td colspan='5' id='center_date'>" . strftime("%B %Y",
<td align='right'><a href='?month=" . strftime("%m",
and it worked. Probably there is some other solution but I haven't tried.
When I've tried to localize the name of the day, it didn't worked.
If you set:
public $day_closed = array("Monday"); to public $day_closed = array("Luni");
and
public $day_order = array("Monday",....), to public $day_order = array("Luni",....)
it changes to available day when you can make bookings. It doesn't recognize the name of the day.
Previously I've asked a question on how to limit the number of checkboxes clicked, but it was moved from here. So, I've tried this in booking-calendar.php:
<script type="text/javascript">
$(window).load(function(){
var SlotCheck = $("#selected_slots input[type='checkbox']");
SlotCheck.click(function()
{
if (SlotCheck.filter(":checked").length > 3)
$(this).removeAttr("checked");
});
});
</script>
It didn't worked.
Re: checkboxes
A moderator moved your post (and I moved your newest one here) because what you did is called thread hijacking: putting your own questions into someone else's thread. Even if the code is related the best thing to do is to make a new thread for your own question and then link to the other thread for context.
So what are we talking about here? Checkboxes or localization?
So what are we talking about here? Checkboxes or localization?
Re: checkboxes
We are talking about : http://www.planetphp.co.uk/free-php-boo ... -calendar/
and http://www.devnetwork.net/viewtopic.php?f=1&t=142196
If you moved it to another place without saying what is the context, how can someone understand what is all about?
I don't think is hijacking but improving.
Tell me how is possible for the persons familiarized with this post: http://www.devnetwork.net/viewtopic.php?f=1&t=142196 to see the questions asked by me?
And for your question:So what are we talking about here? Checkboxes or localization?
Neither !
Is about ajax availability calendar, a subject already opened and not closed. All the solutions are meant to improve that application and to give solutions to those who seek them.
If you think is the right way to open another post on the same subject I will, but in my opinion is not.
and http://www.devnetwork.net/viewtopic.php?f=1&t=142196
If you moved it to another place without saying what is the context, how can someone understand what is all about?
I don't think is hijacking but improving.
Tell me how is possible for the persons familiarized with this post: http://www.devnetwork.net/viewtopic.php?f=1&t=142196 to see the questions asked by me?
And for your question:So what are we talking about here? Checkboxes or localization?
Neither !
Is about ajax availability calendar, a subject already opened and not closed. All the solutions are meant to improve that application and to give solutions to those who seek them.
If you think is the right way to open another post on the same subject I will, but in my opinion is not.