Skip to forum content
Mif
— mystic javascript interface
You are not logged in. Please login or register.
Active topics Unanswered topics
Post new reply
Post new reply
Compose and post your new reply
You may use: BBCode Images Smilies
All fields labelled (Required) must be completed before the form is submitted.
Topic review (newest first)
tree = new Mif.Tree({
initialize: function(){
var input=this.getInput();
input.addEvent('change', function(){
//do something
});
},
...
Hi,
I thought this would be easy, but I've failed miserabley. I am trying to extend the rename facility so that I can, for example, strip out certain characters or replace them with other characters. I already have the functions written and thought it would be easy just to extend the Rename function and hand it back to you with a Ta Da!! - Sorry - I failed 
The function:
function RemoveInvalidChars(theinput, pattern) {
reg = new RegExp(pattern, 'g');
newstring = theinput.value.replace(reg, '');
// only update the input if invalid chars have been replaced
// to avoid annoying behavior (e.g. moving cursor to end of text)
if (newstring != theinput.value) {
theinput.value = newstring;
}
return true;
}
Could you show me how I could add this to your rename function. I can then add the 3 other functions and send back to.
many thanks
Peter