AusQB
New Member
First of all, I'm sorry for cluttering up the forums with all these similar threads, but I keep running into new snags.
What I have here is a main <div> with nav buttons above. When I click the buttons (<td> with onclick function), I want to include() the respective php file into that div.
I've tried all sorts of scripting, but I can't find a solution. I figured the only way to change the contents of the div is to have a function (called from the nav button) that passes a keyword into a switch that will determine the code to write, which I would then insert into the div using the innerHTML attribute.
The problem is that the php statements are parsed before the script is run, so the file data is written out onto the page source. However, it's not even writing that to the div.
I'm sure that might be quite confusing, so please ask for clarification where necessary.
What I have here is a main <div> with nav buttons above. When I click the buttons (<td> with onclick function), I want to include() the respective php file into that div.
I've tried all sorts of scripting, but I can't find a solution. I figured the only way to change the contents of the div is to have a function (called from the nav button) that passes a keyword into a switch that will determine the code to write, which I would then insert into the div using the innerHTML attribute.
The problem is that the php statements are parsed before the script is run, so the file data is written out onto the page source. However, it's not even writing that to the div.
I'm sure that might be quite confusing, so please ask for clarification where necessary.
Last edited: