FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » checkbox own set and reload page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: checkbox own set and reload page [message #170545 is a reply to message #170542] Sun, 07 November 2010 12:23 Go to previous messageGo to previous message
sheldonlg is currently offline  sheldonlg
Messages: 166
Registered: September 2010
Karma:
Senior Member
On 11/7/2010 5:52 AM, The Natural Philosopher wrote:
> anver wrote:
>> a page with inner
>>
>> function A(){
>>
>> there is a checkbox
>> }
>>
>>
>> function B(){
>>
>> unset(variable) or other code;
>> }
>>
>> When page is loaded the check is off and is applied the code in B
>>
>> I would like, for every click on check, to apply or not the code B,
>> and that check remain in the selction made;
>> selction achived not on server but in the pc because it is a form's check
>> used by other user, so not a global set
>
> Try a course in writing comprehensible english, then javascript,.

Agreed, but OP's native language is most likely not English and he is
trying his best to describe his problem in English. So, give him a
break since he is doing the best he can.

As I understand it, here is what he means -- and anver correct me if I
am wrong.

On his form he has a checkbox.
When the user checks this checkbox, he wants something done, namely to
run function B and do things.
When the user unchecks this checkbox, he doesn't want to do things.

So, the simplest way is to have a Javascript function which does the
following:

function newFunction() {
-- test on whether checked or not.
-- if not checked then return
-- if checked then do what he wants done in function B or call
function B
}

Now I am not sure what he wants as far as written to the PC, but I think
he may be able to accomplish what he wants via a cookie. As far as I
know, that is the only thing that can be written to the PC without a
user's explicit permission (and even that requires that cookies be
allowed by the user).

In any event, anver, you should take your question to
comp.lang.javascript as there is nothing in it having to do with php and
there you will find better help.

--
Shelly
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: 25 Essentials for Exceptional Email Campaigns
Next Topic: Return False on download
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sun Nov 24 22:26:05 GMT 2024

Total time taken to generate the page: 0.03995 seconds