Tags:
create new tag
view all tags

Question

Hi to all!!!

I have a question here regarding wiki words in html forms. I have a field and the user must supply a wiki word in that field. How do I check if the value supplied by the user is indeed a wiki word? Any javascript for this. If the word is not a wiki word, i could then prompt the user an alert that the value given is invalid. If not a javascript, how could I do that in an embedded html using an onsubmit event? Any ideas is greatly appreciated. Many Thanks!

Environment

TWiki version: TWikiRelease04Sep2004
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  
Categories: Forms, Javascript

-- MartinJrAdane - 01 Aug 2006

Answer

ALERT! If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.

Look at the source of TWikiRegistration, it uses JavaScript to create a WikiWord out of the user name. You can leverage that for your WikiWord test.

-- PeterThoeny - 01 Sep 2006

The JavaScript file twiki.js that is distributed with TWiki 4 has a function to check for a wikiword: isWikiWord. See for example the latest WebTopicCreator where this script is being used to provide user feedback.

-- ArthurClemens - 01 Sep 2006

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-09-01 - ArthurClemens
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.