Alright, to my problem. Firstly, I have read and tinkered with AJAX and I find it quite amazing and wonderful and so I have set about using it for my web admin system. I realise that my question is quite broad and that fragments of it are answered already but it'll be best if i just ask anyway for the complete answer. So hopefully someone can help me to understand what the right approach is here. Questions that I have whilst explaining will be bolded. Also, please bear with me since I am new to AJAX and it's possibilities and implimentations...hence these might be very stupid questions.
At the moment, I have a frame-based system (i know i can make it non frame-based ... i will if i have to) with a header, main and footer page. 'header' contains the buttons to load the 'applications', and 'main' contains the 'desktop' - this is called AdminPage and it's a PHP file.
At the moment, since I have just started creating this system, there is only a login window which appears in AdminPage. I do this essentially using a PHP 'include' to call the 'application' into a layer, and it is essentially is just another HTML page being included. Something along the lines of:
<body class="bodyMain">
<?php
// If we're not logged in, display login form
if ($LoggedIn != 1) {
ApplicationLoad("Login");
} else {
// load other applications??
}
?>
</body>
The problem, as I understand it, is that this login thing is hard-coded to appear in my PHP based on whether a login session is set or not. While this is technically correct, the issue comes later ... when I click on (for example) the 'My Applications' button ... a new window (or application ... or div with include) should appear, while retaining the old ones. Simple dynamic windows. But how can this be achieved when PHP is mostly involved?
Basically what I need is the ability to create infinite new 'windows' client-side, without refreshing AdminPage.php - I know that this is possible on a pure HTML level (click on the form button and a new window gets created) but is it possible with a whole lot of PHP and calls to databases? Do i need to use XML to carry information?
I use prototype.js with scriptaculous.
I realise the actual question is kindof vague, but my understanding here is kindof muddled and I don't want to code everything with PHP functions and waste time. I do hope that my post is understandable and that someone can help me. I am willing to send a ZIP of the overall code and a SQL dump on a private message basis.
Thanks in advance!
