Hello, I am trying to put together a web site that takes ALL content from the MYSQL database and displays it in dynamic text boxes…
I am having no trouble getting the variables from PHP, it is just a problem of storing those variables so taht they can be used later. Problem is displayed here:
http://test.un-identified.com/gateway/index.html
click through all 3 buttons – make sure it loads the content, after you have clicked through all three, try clicking them again – the content does not show up and i cannot figure out why – or a soultion to it.
here is the function to get the content when given a page title.
function get_page(page_title){
//creates a new loadVars object with the title of requested page, then returns
// with the page content to put inside the text box
content = new LoadVars();
content.page_title = page_title;
content.onLoad = function(success) {
if (success){
// enters recieved content into text box
_root.content_box.scrollerText.htmlText = this.content; } else{
trace("Problems...");
}
}
content.sendAndLoad("http://test.un-identified.com/gateway/php/display_page.php?uniqueID=" + getTimer() , content, "POST");
}
Here is some button code that calls the function with the desierd page title as a parameter:
on (release) {
_root.get_page("Home");
}
(also: the ‘loading’ is just another variable i load with LoadVars everytime a button is clicked (before the get_page() function is called) so as to make sure the text box reloads with new content each time --is there a real way to check if the content is loaded, and possibly use a loading bar for this type of dynamic content?)
Thanks