very general help i'm sure...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Cepo
Forum Newbie
Posts: 1
Joined: Wed Feb 25, 2004 12:32 pm
Location: Savannah, Georgia, USA
Contact:

very general help i'm sure...

Post by Cepo »

hello,

i saw a post in another forum saying that you can't pass information in a php page and execute it without reloading the page... does that mean that if i have a menu on my webpage for all of the different .htm files, and i want those files to display in a div layer (an imitation iframe basically) when you click on them.. do i have to reload the page?

if not, how would i go about doing this? (i'm pretty new but i know the basics). i understand that i'd probably have to set each menu item as a variable and then have a statement to display the proper page in the div layer upon clicking, i just can't get my head around it. any help would be great.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post by pickle »

Ya, PHP is a server side language, which means it can only execute stuff when events happen on the server. Clicking a menu item in a browser is an event on the client side, so nothing would happen on the server. You could attach a javascript to the menu so that when something is clicked, the page is automatically reloaded. That would trigger an event on the server, which means PHP could do stuff. Does this help?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
tylerdurden
Forum Commoner
Posts: 66
Joined: Mon Jul 28, 2003 11:52 am
Location: Austria

Post by tylerdurden »

Without reloading the page there are really 2 possibilities:

1) Load everything on 1 page, put it into <divs> that you hide or make visible via Javascript.

2) Use Flash which can write to and load data from a php page (or any other page) dynamically without reloading the current page.
Post Reply