Hi Again....been busy using my farm of TWs and not much time birthing new 
ones...till now....

I have a simple TW that opens from a bookmarklet.......the TW is basically 
a html form that uses information passed to it ... recording url, title, 
dominion and highlighted text..... a sort of homespun version of the old 
TiddySnip!   Except that I can edit the information, add more stuff and 
then, click the submit button to have that data stored into a flat text 
file on my server....using simple PHP. 

So I can record a "bookmark", with added notes and comments into my 
text-based database on my server.

Next step....... as well as storing this data into the text-data-base I 
want to also have the form create a tiddler with the information....and 
store that tiddler in the appropriate TW.....so the form has a number of 
"submit" buttons with code such as -

<input type="submit" value="eAi" onclick='
config.options.txtUploadFilename="eAi.html"
config.options.txtUploadDir="../../AquiAiDragons/";
config.options.txtUploadStoreUrl="../../../AquiAiDragons/store.php";
config.options.txtUploadTiddlerStoreUrl="../../../AquiAiDragons/storeTiddler.php";
var f=this.form;
localStorage.text="Fonte: "+f.url.value+"\nCitando: 
"+f.citado.value+"\nNotas: "+f.comment.value;
store.saveTiddler(f.titulo.value, f.titulo.value, localStorage.text, 
localStorage.username, new Date(), f.tags.value, "");
this.form.data.value=f.titulo.value+"|"+f.slideRef.value+"|"+f.tipo.value+"||"+f.citado.value+"|"+f.comment.value+"|"+f.tags.value+"|"+f.when.value+"|"+f.username.value+"|"+f.url.value+"|"+f.materia.value+"|"+f.curso.value+"#n";
'>

where I define a button (called "eAi")....set the uploadTiddler parameters, 
construct the text that is to be inserted in the new tiddler...use 
store.saveTiddler to pass that new tiddler to the appropriate TW....and 
then construct the data line that will be recorded in the text file.... by 
the php file set at the header of the form.

all this works..... EXCEPT.....note that the text line construct formats 
the text using linebreaks ("\n")...... this breaks the store.saveTiddler 
parameters and this macro fails to work. If I remove the "\n" from this 
code...the store.saveTiddler macro works perfectly.... BUT the text is not 
formated with the linebreaks in the tiddler at the other end...which makes 
reading the information a little cumbersome.

SO, how can I code the formatting of the text in a way that does not break 
the store.saveTiddler macro? I tried "<br>".... that doesnt break the 
macro...but doesnt format the text in viewtemplate either!

Thanks in advance
Skye


-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to