Page 1 of 1

Hiding/Activating functions (Another question, I know :P)

Posted: Thu Jun 28, 2007 12:11 pm
by Fuzzo
I know am probably asking way too many questions than is healthy but I have to find out these things some way :S

So the basics of what am trying to achieve are as follows

USER VISITS GALLERY PAGE (gallery.php)

CATEGORIES use ( <?php displayCategories($phpfile);?> )
(ONCE CLICKED)
\/ display

THUMBNAILS use ( <?php displayList($phpfile, "thumbnail");?> )
(ONCE CLICKED)
\/ display

IMAGES use ( <?php displayImage($id);?> )


I thought there might be a way to activate these functions when a user clicks on the appropriate section.

Hope this makes sense.

Thanks :P

Posted: Thu Jun 28, 2007 12:14 pm
by idevlin
What do you mean by "activate"? Do you mean that when a user clicks on a specified link, that the function itself is called and then run?

Posted: Thu Jun 28, 2007 12:16 pm
by Fuzzo
Well I know that would be the easiest solution

But as I understand it, its kind of impossible because to activate a function it has to go through the server - which wouldnt happen?

Correct me if am talking nonsense! Im looking for some kind of alternative :P

Posted: Thu Jun 28, 2007 12:31 pm
by idevlin
Well you could just reload the page and run the specified function...

Posted: Thu Jun 28, 2007 12:43 pm
by Fuzzo
How would I make the page reload with the specified function? Thanks for your help.

Posted: Thu Jun 28, 2007 3:39 pm
by feyd
Likely, URL based controls.

Posted: Fri Jun 29, 2007 5:01 am
by idevlin
As feyd said, using something in your URL.

e.g.
When someone clicks on a specified link it either reloads the same page or a different one and passes in a parameter which your PHP script reads and then decides to run the extra function that you want it to run.