Hi,
i can’t seem to figure out how to load text from a mysql via php to a dynamic text box… i know that there is nothing wrong with my sql or php coding because when i try to load it in a textarea component it works, but i it donesn’t work in a dynamic text box.
my code for loading it is
function loadEntries(act, increment) {
// Define NumLow as a Number
num = new Number(_parent.NumLow);
// Act accordingly
if(act == "Next") {
// Add increment
_parent.NumLow = num + increment;
} else if(act == "Previous") {
_parent.NumLow = num - increment;
} else {
// Load default - i.e. 0
_parent.NumLow = 0;
}
// Update Statistics
_parent.read.low.text = _parent.NumLow;
_parent.read.high.text = Number(_parent.NumLow) + 10;
// Show Please wait text
_parent.read.entries.text = "Laster innlegg...";
// Begin Loading
myEntries = new LoadVars()
myEntries.ref = this
myEntries.load("GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow)
myEntries.onLoad = function(success){
if(success){
// Assign output to components and objects
entries.text = this.entries;
totalEntries.text = this.totalEntries;
//Update values to calculate prev/next button visibility
num = Number(_parent.NumLow)
var totalEntries = Number(this.totalEntries);
var total = num+increment
//Hide/show next button
if(total<totalEntries) this.ref.next_button._visible = true;
else this.ref.next_button._visible = false
//Hide/show previous button
if(num==0) prev_button._visible = false; else prev_button._visible = true
}
}
}
// Load Default
_parent.read.loadEntries("Default", 10);
stop();
the text box i’m trying to load in is “entries”
please help me before i go nuts
Thanks
regardo