> var newTitle = String('000' +
> newNummer).substring(String('000' + newNummer).length,(String('000' +
> newNummer).length)-4);
Although I'm not sure why your code seems to 'crash the browser', one
thing of note:
javascript is "weakly typed", so you can simplify the above expression
in your code by writing it like this:
var newTitle='000'+newNummer;
newTitle=newTitle.substr(newTitle.length-4,4);
In the first line, concatenating a string literal with a numeric
variable results in string variable named 'newTitle'. Then, in the
following line, there's no need to explicitly recast the type using
String(...), since the variable is already of the desired type.
Also, the first param in story.displayTiddler(...) is supposed to be
one of:
A) a *tiddler* DOM element
B) null (or string literal "top")
C) string literal "bottom"
In your inline <script>...</script> code, reference to "this" is
indeterminate, and is definitely not the right value to use. Instead,
you should write:
story.displayTiddler(story.findContainingTiddler(place),newTitle);
where 'place' is a variable that is automatically defined by
InlineJavascriptPlugin, and refers to the immediately surrounding DOM
element that contains the script being invoked. Then,
story.findContainingTiddler() searches outward from that 'place' to
identify the *tiddler* DOM element in which the script.
HTH,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
P.S. Although I've responded here, questions regarding *programming*
for TiddlyWiki are best posted to the TiddlyWikiDev GoogleGroup.
While the dividing line between user and developer discussions is not
always clearly defined, the intent is to try to avoid overloading the
general TW user group with too many highly technical discussions.