O'Reilly logo

jQuery 1.3 with PHP by Kae Verens

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating, renaming, and deleting directories

Let's say we want to create/rename/delete directories apart from the root directory, /, which should of course never be renamed or deleted.

Keeping with the compact theme, this example involves adding a select box with a list of actions that can be performed on the selected directory.

In the HTML, all that should be changed is the <option> element — we defined /dir1/ as being selected in the last example, but as we are adding the ability to delete directories, it's best to set the value in this example to a directory that cannot be deleted. In your own production code, you should make sure the selected directory exists before printing it out to the select box. In this example, it's plain HTML, so there ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required