Could someone tell me why this code isn't executed

48 views
Skip to first unread message

Clifford Bressette

unread,
Nov 13, 2012, 10:28:38 PM11/13/12
to tiddl...@googlegroups.com
This worked (well it was a bit different) but now it seems like this code isn't even considered.

<html>
<form>
Recipient:<br> <input type="text" name="recipient" /><br>
Subject:<br>   <input type="text" name="subject" /><br>
Message:<br> <textarea name="message" cols="40" rows="5">
</textarea><br>
<input type="button" value="Submit" onclick='
   var Subject = this.form.subject.value;
   var Recipient = this.form.recipient.value;
   var Message = this.form.message.value;
   var now = Date.FormatString(0hh0mm0ss);
   var newMessage = new Tiddler(Recipient + "-Msg-" + now);
   newMessage.title = (Recipient + "-Msg-" + now);
   newMessage.text = "| " + Subject + " ~||\n"+ "| "Message +"| ";
   store.saveTiddler(newMessage);
   story.displayTiddler(newMessage);
   this.form.subject.value = "";
   this.form.recipient.value = "";
   this.form.message.value ="";
' />
</form>
</html>

Clifford Bressette

unread,
Nov 14, 2012, 12:25:04 AM11/14/12
to tiddl...@googlegroups.com
Solved!

Wow a fresh set of eyes reveals so many errors.
I won't clog the group with a bunch of code, but if anyone is curious let me know and I will post it or send it to you.

Craig in Calgary

unread,
Dec 6, 2012, 2:21:25 PM12/6/12
to tiddl...@googlegroups.com
...if anyone is curious let me know and I will post it or send it to you.

I'm interested, Clifford. Thank you.

Craig
Message has been deleted

Clifford Bressette

unread,
Dec 6, 2012, 8:35:27 PM12/6/12
to tiddl...@googlegroups.com
Hey glad to help.
My last reply was deleted before it was viewable, so I'm going to try this again.

If you are interested in why this code wasn't executed then all I can say is that (it seems) JS code which isn't tagged with systemConfig and thus loaded on startup then erroneous code is ignored. This has greatly impeded debugging for myself, but a simple solution which worked for me is that I put 'alert("It worked!")' at the end of that block of code. Then even when the code won't produce instantly apparent output then you still know that there were no obvious errors in the code so it was executed.

If you are interested in seeing the actual plugin in action I am creating a tiddlyspot to showcase the working messaging system. You should know beforehand that this system depends on the ForEachTiddlerPlugin, the InlineJavascriptPlugin, the NestedSliderPlugin and the DataTiddlerPlugin. All tiddlers which make the messaging system are tagged 'messaging'. Also the Inbox tiddler is entirely dependant upon the active username, so if you wish to see the tiddlers which are intended for another user then you must change the current username. the username (if you don't know is accessible from the right sidebar under options).

anything else I'd love to help.

Clifford Bressette

unread,
Dec 6, 2012, 9:12:00 PM12/6/12
to tiddl...@googlegroups.com
Here is the link to the tiddlyspot page I mentioned earlier.

http://ilovetux609.tiddlyspot.com/
Reply all
Reply to author
Forward
0 new messages