You can add a button to the bottom of your page which opens a small dialog that asks for a page name or namespace. It pops up a small entry box with a form in it:
<form>
new page: <input type="text" id='addpage_ns'>
<input type="button" onclick="add_page();" value="submit">
</form>
Include this form in a div which can be formatted as a small box; you can include a close button inside this box, in case the user wants to cancel. You can include reminder instructions inside this box, that a namespace looks like this:
dir:dir_1:page_name
The add_page is a javascript function that looks like this:
function add_page() {
if(!document.getElementById('addpage_ns').value) return;
var url = 'http://' + location.host + location.pathname + '?id=' + document.getElementById('addpage_ns').value;
window.location = url+'&do=edit';
}
Inside this add_page function you can do your checking for correct path name format, something like this:
path=document.getElementById('addpage_ns').value;
path = path.replace(/\//, ':'').