The easiest way to catch errors in such onclick handlers is ...to
catch them.

Wrap your onclick handler with...

try{

...
myCode();
...

}catch(e){
  alert(e); //show's you what's wrong
  return false; //prevents sumbission
}return true;

...then you would probably be notified of the fact that your form has
no inputs that go by the name of from, when, name or extratags ...so,
you need to create them, i.e.

<input type=hidden name=from>

Without those... your onclick handler will simply abort, yet the form
will keep on submitting... as you did not have any error handling to
prevent it from doing so.

Also, in terms of performance, I would guess it is better to create
your tagstring first and only in the end assign it to your form
element, i.e.:

var tgs='';
story.forEachTiddler(function(title, tiddler){
  tgs+='[['+title+']] ';
});
f.extratags.value=tgs;

Last but not least, there is hardly any use in putting linebreaks
behind hidden form elements.

Let me know if you're still at loss or if that helped.

Cheers, Tobias.

-- 
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.

Reply via email to