Page 1 of 1

very general help i'm sure...

Posted: Wed Feb 25, 2004 12:32 pm
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.

Posted: Wed Feb 25, 2004 3:55 pm
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?

Posted: Wed Feb 25, 2004 4:06 pm
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.