Consortium
Activities
Projects
Forge
Events
Log-in
Register
XWikiCommonJavascript
Space Menu
Consortium
|
Solutions
|
Middleware
|
Forge
|
MyObjectWeb
|
PDF
|
History
|
More Actions
View
Code
|
XML
|
Help
Documentation
|
XWiki Syntax
|
{pre} <script type="text/javascript"> <!-- function updateName(field1, field2, removeclass) { var name = field1.value; name = name.replace(/[???]/gi,"a") name = name.replace(/[????]/gi,"e") name = name.replace(/[??]/gi,"i") name = name.replace(/[??]/gi,"o") name = name.replace(/[???]/gi,"u") name = name.replace(/["!?]/g,""); name = name.replace(/[_':]/g," "); if (removeclass!=false) name = name.replace(/class$/gi,""); if (navigator.userAgent.indexOf("Safari")==-1) { name = name.replace(/\s(.)/g,function(str, p1) { return p1.toUpperCase(); }); name = name.replace(/^(.)/g,function(str, p1) { return p1.toUpperCase(); }); } name = name.replace(/\s+/g,""); if (field2 == null) { field1.value = name; } else { field2.value = name; } if (name=="") return false; return true; } // --> </script> {/pre}