Well,
How experienced are you?
average... I guess... maybe average++
Do you use the guestbook inside of a construction with several movieclips?
I have main.swf which loads guestbook.swf using loadmovie.
is the server backend running ok?
Yes. the guestbook is working just fine.
do you use loadVars object?
yes.
------------------------
guestbook.fla:
two mc's:
read
write
------------------------
write mc ... as1 on frame 1.
yourname, youremail, yourcomments are inputfields' instancenames.
submit.onRelease = function() {
//
// Modify these reference paths to yours if you
// have changed them. Also modify gb_status
// reference path if required
//
yourname = yourname.text;
youremail = youremail.text;
yourcomments = yourcomments.text;
// Check variable data
if (yourname eq "") {
gb_status.text = "Vul je naam in";
} else if (youremail eq "") {
gb_status.text = "Vul je e-mail adres in";
} else if (!youremail.length || youremail.indexOf("@") == -1 || youremail.indexOf(".") == -1) {
gb_status.text = "Dit is geen geldig e-mail adres";
} else if (yourcomments eq "") {
gb_status.text = "Je hebt nog geen bericht ingevuld";
} else {
gb_status.text = "Een ogenblik...";
newEntry = new LoadVars();
newEntry.ref = this;
newEntry.submit = "Yes";
newEntry.yourname = yourname;
newEntry.youremail = youremail;
newEntry.yourcomments = yourcomments;
newEntry.sendAndLoad("GuestBook.php?action=write&r="+random(999), newEntry, "POST");
newEntry.onLoad = function(success) {
// not working
_parent.write.yourname.text = "";
// not working
_parent.write.youremail.text = "";
// not working
_parent.write.yourcomments.text = "";
// not working
if (success) {
// Clear fields
_parent.write.yourname.text = "";
// not working
_parent.write.youremail.text = "";
// not working
_parent.write.yourcomments.text = "";
// not working
_parent.write.gb_status.text = this.gb_status;
// not working
_parent.read.loadEntries("Default", 10);
}
};
}
};
wissen.onRelease = function() {
// works
_parent.write.yourname.text = "";
// works
_parent.write.youremail.text = "";
// works
_parent.write.yourcomments.text = "";
};
What has to happen:
when you press 'submit button' it sends the message (works just fine!!) but it should also 'reset' the inputfields.
This isn't happening. If you give the 'yourname, youremail etc' a var-name you can 'reset' it but still it says 'vul je naam in' (which is Dutch for: enter your name).
That's my problem now...
It's quit a different topic now, I agree.