On 4/16/07, Tim <user@xxxxxxxxxxxxx> wrote:
... > You could use AJAX to get things from/to PHP, but why should > you? You can use session within javascript too i believe. > > > > > Tijnema > > > > > > ps. Maybe you could also use AJAX instead of submitting forms the > > > whole time. ... > Really, it's not that hard to use AJAX. You might want to > look at www.tizag.com, there it is really easy explained. > It's nothing more then making new request to scripts inside > javascript. > Was a great idea and also works great until the moment i needed to upload images :P You have a suggestion for that by any chance Tijnema? Regards, Tim
I would use an iframe for this.Didn't test following code, but shoudl work though. <iframe name="imgupload"></iframe> <form action="upload.php" method="post" target="imgupload" enctype="multipart/form-data"> <input type="file"><input type="submit" value="upload"></form> and now just make sure that your upload.php script doesn't return anything, or it will be displayed inside the iframe :) If you want to know when upload is done, you should check that through AJAX. you could give the upload an unique number, and store the results of the upload in a database for example, then request that id once in 10 seconds lets say, and when it's done it will return something useful :) Tijnema
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php