PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Oct 17, 2017 10:56 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: checkboxes
PostPosted: Wed May 04, 2016 1:20 am 
Offline
Forum Newbie

Joined: Wed May 04, 2016 12:55 am
Posts: 11
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>


Top
 Profile  
 
 Post subject: Re: checkboxes
PostPosted: Wed May 04, 2016 6:11 pm 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6572
Location: WA, USA
"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?


Top
 Profile  
 
 Post subject: Re: checkboxes
PostPosted: Wed May 04, 2016 11:16 pm 
Offline
Forum Newbie

Joined: Wed May 04, 2016 12:55 am
Posts: 11
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.


Last edited by requinix on Thu May 05, 2016 12:30 am, edited 1 time in total.
removing sid from url


Top
 Profile  
 
PostPosted: Wed May 04, 2016 11:34 pm 
Offline
Forum Newbie

Joined: Wed May 04, 2016 12:55 am
Posts: 11
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.


Top
 Profile  
 
 Post subject: Re: checkboxes
PostPosted: Thu May 05, 2016 12:36 am 
Offline
Spammer :|
User avatar

Joined: Wed Oct 15, 2008 2:35 am
Posts: 6572
Location: WA, USA
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?


Top
 Profile  
 
 Post subject: Re: checkboxes
PostPosted: Thu May 05, 2016 1:35 am 
Offline
Forum Newbie

Joined: Wed May 04, 2016 12:55 am
Posts: 11
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: Bing [Bot] and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group