开发者

Live update select

开发者 https://www.devze.com 2023-02-21 12:19 出处:网络
I\'m new to Jquery... I have a select listing all the files within a directory (listing done in php) and an upload form on the same page adding files to this directory.

I'm new to Jquery... I have a select listing all the files within a directory (listing done in php) and an upload form on the same page adding files to this directory.

I am looking for a way to update the select listing without refreshing the page when the uplo ad is complete (I have an onComplete function). I have looked into the .live() metho开发者_运维知识库d without any success.


I think AJAX is your answer. Read the documentation http://api.jquery.com/category/ajax/

You have to write a PHP function to get the list of new files, run the AJAX request to get this new list when onComplete then update your HTML using these new elements :)

0

精彩评论

暂无评论...
验证码 换一张
取 消