[Moin-user] Calling MoinMoin from a Web form

Bill Vodall - WA7NWP wa7nwp at yahoo.com
Tue Dec 10 08:51:08 EST 2002


Hello,

I'm working on setting up a Wiki button on my home page.  If the text box is
empty, then it simply loads the FrontPage.  If there's a word in the text box, then
I want it to load that page.

The first part, with no text, works fine.   The second part is a bit of a problem as it
creates a "page=..." entry in the URL.   (The word page is configured in the web form.)

   http://www.jnos.org/cgi-bin/moin.cgi?page=WikiPage

So what I'm hunting for is if there's an Action word for simply loading the page.    I'm
pretty sure there isn't in the 0.11 I'm mainly running.  Maybe in 1.0 which I'm soon
to move to. 

Here's my web page (http://www.jnos.org) form entry:

<td valign=center>
   <FORM name="WikiForm" method="GET" action="http://www.jnos.org/cgi-bin/moin.cgi">
     <INPUT type="text" name="page" size=10>
     <INPUT type="button" value="Wiki" onclick="validateWiki()">
   </FORM>
</td>


And here's the JavaScript it calls:

function validateWiki() {
   if (document.WikiForm.page.value=="") {
     window.open("http://wiki.jnos.org/")
     }
   else {
     document.WikiForm.submit()
     }
   }


Thanks..
Bill





More information about the Moin-user mailing list