Hi,
I am trying to make a box for inputting new tiddlers (tiddler titles only).
It has to operate from the Main Menu and I want it to create the tiddler "silently" (without opening it).
I hacked and mutilated the code and got it working in the "story" part of the TW. It only works on the Main Menu when the tiddler containing it is also being displayed for viewing.
Sorry if this all sounds complicated.
Here is the re-purposed code:
<html><nowiki><form id="Notes" style="width:100%;height:20px;">
<input title="message title" name="msgTitle" type="text" cols="60" style="width:90%;height:20px;padding:0px;margin-bottom:1px;margin-right:2px;border:1px solid #CCC;"><input title="tags added to message" name="msgTags" type="text" cols="60" style="display:none;width:0%;height:20px;padding:0px;margin-bottom:0px;border:0px solid #CCC;"><br/>
<textarea title="message body" name="msgBody" rows="1" cols="0" style="display:none;width:0%;height:0px;padding:0px 0px;margin:0px;float:left;border:0px solid #CCC;"></textarea>
<input class="button" type="button" value="ok" style="font-weight:bold;font-size:1.0em;width:9%;height:22px;float:right;border:1px solid #CCC;margin:-23px 0px 0px 0px;" title="click to save this message" onclick="
var note=this.form.msgBody.value;// if (note=='') return;
var tags=this.form.msgTags.value.readBracketedList();
tags.push('day');
var tid=story.findContainingTiddler(place).getAttribute('tiddler');
var who=config.options.txtUserName;
var when=new Date();
var title=this.form.msgTitle.value;
if (title=='') title=when.formatString(' YYYY-0MM-0DD 0hh:0mm:0ss');
var msg=config.messages.overwriteWarning.format([title]);
if (store.tiddlerExists(title) && !confirm(msg)) return;
store.saveTiddler(title,title,note,who,when,tags,{});
this.form.msgTitle.value='';
this.form.msgTags.value='';
this.form.msgBody.value='';
this.form.msgTitle.focus();">
</form></html>
I would be grateful for any pointers.
Thank you.
Johannes