Similar - just a bit more elaborate:
<%
String val = "Name Here!";
String query = request.getParameter("query");
if (query == null) query="value='"+val+"'"; else query="value="+query;
%>
<div class="createbox">
<SCRIPT language="JavaScript">
<!--
function checkNameHere() {
var pageName = document.newPage.page;
if ( pageName == undefined || pageName.value == "<%=val%>") {
alert("Please specify a page name in the box at the right at the
button!");
return (false);
} else return (true);
}
//-->
</SCRIPT>
<form action="<wiki:Variable var="baseURL"/>Edit.jsp"
accept-charset="<wiki:ContentEncoding />"
name="newPage" onsubmit="return checkNameHere();">
<input type="submit" name="action" value="New Page"/>
<input type="text" name="page" size="11" <%=query%>
onblur="if( this.value == '' ) { this.value = this.defaultValue };
return true; "
onfocus="if( this.value == this.defaultValue ) { this.value =
''}; return true; "
/>
</form>
</div>
On 5/5/2010 10:34 PM, Foster Schucker wrote:
I have this code in the left nav bar of my wiki:
<DIV class="createbox">
<FORM action="http://www.schucker.org/Edit.jsp"
ACCEPT-CHARSET="ISO-8859-1,UTF-8">
<A CLASS="wikipage"
HREF="http://www.schucker.org/Wiki.jsp?page=CreateNewPage">Create New
Page:</A>
<INPUT type="text" name="page" size="20">
</FORM>
</DIV>
I put the name of the page into the box and hit enter.
The normal way is to edit a page, put the new page link in the page
[MyNewPageName] and save. Click on the red link in the page and
you'll be asked to edit the new page.
Good luck!
Foster
Bhupesh Ravish wrote:
Hello Guys,
I have started using JSPWiki, and got stuck with a problem, I could
not find
a way to create new pages. Can anyone help me in this.