1 /* $Id: new_page.js,v 1.1 2004/10/24 17:32:54 rich Exp $ */
8 document.f.title.focus ();
9 document.f.submit.disabled = true;
10 div = document.getElementById ("show_link");
15 if (timer) clearTimeout (timer);
16 timer = setTimeout ("update_now ()", 1);
19 function update_now ()
23 var title = document.f.title.value;
24 if (title.search (/[a-z0-9]/gi) == -1) {
25 document.f.submit.disabled = true;
28 document.f.submit.disabled = false;
29 title = title.replace (/&/g, "&");
30 title = title.replace (/</g, "<");
31 title = title.replace (/>/g, ">");
32 title = title.replace (/\"/g, """);
33 div.innerHTML = "You can create links to this page when editing by putting two square brackets around the page name, like this: <br/><br/> <code>[[" + title + "]]</code>";