Thats it! Thank you w! (and thanks for replying PMario) I had a template with stuff like this <<select [[location@here]] rows:1 allowBlank +BodyLocationTemplateTotal allowEdit>> which worked fine except for when viewed through a transclusion, and now I just replace the word "here". Works great.
On Mar 24, 7:44 am, whatever <[email protected]> wrote: > Try > > <script label="input short description of problem here" title="input > short description of problem here"> > var alwaysTag="ProblemsList"; > var p1=prompt("Problem name",""); > if(!p1)return; > if(store.tiddlerExists(p1)) { > if(! > confirm(config.messages.overwriteWarning.format([p1.toString()]))) > return null;} > var tags=(alwaysTag); > var title=(p1); > store.saveTiddler( > title, > title, > store.getTiddlerText('ProblemTemplate').replace(/PLACEHOLDER/g, p1), > config.options.txtUserName, > new Date(), > tags); > autoSaveChanges(null,[tiddler]); > story.displayTiddler(null,title); > </script> > > I'm guessing that in your ProblemTemplate, you probably use $1 as a > placeholder. The replace function didn't work for me in that case, so > I suggest you replace $1 with PLACEHOLDER (or some other word). I > tried and it worked. > > If you use the default theme, add the following to the stylesheet to > make the link look like button: > /*Script Buttons*/ > .scriptbutton a {color:[[ColorPalette::PrimaryDark]]; border:1px solid > [[ColorPalette::SecondaryMid]]; font-weight:normal; margin:2px; > padding:0px 3px;} > .scriptbutton a:hover {color:[[ColorPalette::PrimaryDark]]; background: > [[ColorPalette::SecondaryLight]]; border-color: > [[ColorPalette::SecondaryMid]]; font-weight:normal; margin:2px; > padding:0px 3px;} > .scriptbutton a:active {color:[[ColorPalette::Background]]; background: > [[ColorPalette::SecondaryMid]]; border:1px solid > [[ColorPalette::SecondaryDark]]; font-weight:normal; margin:2px; > padding:0px 3px;} > > You can use it like this: > {{scriptbutton{ > <script ...> > THE ABOVE SCRIPT > </script> > > }}} > > w > > On 24 mar., 14:12, PMario <[email protected]> wrote: > > > Hi Dave, > > > Reading you code, it is very hard, to guess, what you want. > > > I think it would be easier, if you discribe you problem in prose. > > > -m > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

