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

Home » Imported messages » comp.lang.php » checkbox and reload a page
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: checkbox and reload a page [message #170855 is a reply to message #170851] Fri, 03 December 2010 17:43 Go to previous message
J.O. Aho is currently offline  J.O. Aho
Messages: 194
Registered: September 2010
Karma:
Senior Member
anver wrote:

> is similar to a normal registration user form with this difference:
>
> generally in these forms, user active checkbox and after with send's button
> the php passing its datas to another page;
> in my case instead, the whole page is already pre-loaded and the same datas
> aree send at a report's page for print;
> so checkbox is used for reloading the same page but removing something
> variables (with ..code.. that is an unset command)

What you are looking for is really ajax, this is mainly done in javascript,
the script that receives the data or sends the data can of course be simple
php scripts.

1. you load a page with ajax.
2. action on the page executes the ajax function (to send or fetch data)
3. the php script will process the request and send a result back to the page
4. the ajax function will process the reply and displaying the result.

if you reload the page, it can be possible to have all the previous data
there, check boxes checked and so on, if the changes are always sent back and
stored in a session or stored in a normal cookie (the later can be done
without really using ajax).

For the javascript part, you have to seek out other places to discuss that,
when it comes to the php part, it's exactly the same as it would have been
with a standard form.

--

//Aho
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Evaluating an expression
Next Topic: comp.lang.php
Goto Forum:
  

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

Current Time: Mon Nov 25 00:31:43 GMT 2024

Total time taken to generate the page: 0.03751 seconds