Flashmatazz Guestbook

Hi again, Kirupians

Yes, yes i know...*another* guestbook question, hehe. Please hear me out though, first. I ran across this guestbook tutorial [here](http://www.kirupa.com/web/xml_guestbook.htm) that i would like to use. Now before i went ahead and put together a custom interface and the like, i decided to simply upload all of the files, untouched from the Zipfile given in the tutorial and of course path's were changed accordingly, to my server just to see if the scripting indeed works. But, when i went to test it out, i received an error. 

The default guestbook entry is loading fine; but, when i go to “add a new entry”, and submit this new entry, the default entry dissapears and the new entry is not visible. You can see the problem in action here.

I hope someone is able to help me out here. I’m more than willing to let you see the rest of my files if necessary.

Take care.

are you sure you server lets you chmod ? (ie give server writing access)
I think it’s chmod 777 or something like that…

hm, i’m not quite sure, i just signed up with this hosting company a few days ago, so im still exploring everything. I ran a search on their site for the “chmod”, and came up with this. I believe it’s under the CGI section.
Can you make sense of what the site has to say?

Ok, problem was solved for the most part. I simply had to change my chmod to 766 instead of the default.

But, i have one last question if anyone is able to still help with this.
When the user hits the “add entry” button, then clicks the “submit” button, the message is sent, which is what i want. But, when the user repeats this action, hitting the “add entry”, the previous message is still in the Input Boxes.
How would i have the Input boxes clear once first submited?

[edit] My idea would be:
[AS]
on(press) {
messageField.text = ""
nameField.text = “”
}
[/AS]
But, that clears the fields too quickly, and doesn’t allow it to send the variables to through the php…

I hope i was clear enough. Thanks a ton.

Takecare,
Victor.

Change the code of you createButton in this [size=1](Not tested)[/size]

createButton.onRelease = function() {
	this._visible = false;
	this._parent.createMessage._visible = true;
	createMessage.nameField.text == "";
	createMessage.messageField.text == "";
	Selection.setFocus(createMessage.nameField);
};

scotty(-:

Thanks for helping out, scotty :slight_smile:
I tried out your as, and at first when i went to preview it, it didn’t clear the input boxes. But i removed one of the ='s just to expirement, and it cleared the boxes. But, this only worked when i was previewing it in the Flash program; once i uploaded it to my server, it still didn’t work.

:pa:

victor

You are right about the “=” :slight_smile:
I tried and tested this one:

createButton.onRelease = function() {
	this._visible = false;
	this._parent.createMessage._visible = true;
	createMessage.nameField.text = "";
	createMessage.messageField.text = "";
	Selection.setFocus(createMessage.nameField);
};

and it worked for me (locally and on the server)

scotty(-:

viola! :} It works, thanks a lot scotty.

takecare

one last question though…why is it that the as you posted before didn’t work, and this new version did? Because it looks like both of the code sets you posted are identical with the exception of the two ='s that i pointed out… I’d just like to understand this a little better :thumb:

Double ='s are for conditional statements, such as if(blah == blah)

LOL, yep, they’re identical:)
I don’t know, maybe the old code was still in cache?

scotty(-:

strange :huh:

Oh well, thanks for helping out.

takecare

Im trying to get Flashmatazz’s Guestbook to work, and when i upload it to a server, to test it out, i am unable to add comments… I gather that i mush change CHMOD permissions, or something, but im not sure where i would do that, and also, what adverse effects it could have if any… Perhaps someone could shed some light on the situation for me… it would be much appreciated…

EDIT: Aha! Nevermind, i got this bad boy figured out… It is very simple to change the permissions for an individual file using IpowerWebs Cpanel… thanks anyway to all who would have responded… :rabbit:

Who could explain why the Guestbook resets back to only 1 entry when refresh is pressed… Im sure its something simple, but i can only guess. Anybody??