[tw] Re: Help with javascript new.window
Hi Whatever OK. The javascript code I showed is a bookmarklet...it sits under a button in my favorites toolbar and when clicked that code is executed. The code itself simply reads in the basic information about the page I am on name, url, domain and picks up if I have selected any text from the page ( as a quote)... and the code then opens a new window and in that window opens a TW that sits on my server...passing to the TW the information.. The TW on my server is a very basic, and by default opens to a simple HTML form.. which gets filled with the above page information, lets me add other bits of information (mainly tagging and extra comments) and then when I hit the done button in the form, it saves the information, making a new tiddler . with UploadTiddlerPlugin (BidiXTW) set to automatally update the TW to my server... So. to bookmark a page I like...I simly hit the toolbar button, that opens a window and then I hit done the page information is in the on-line TW. Its a crude replacement for TiddlySnips...except it works with ease to store the bookmarks on-line. AND, my intention now is to give this bookmarklet to my studentsso that they can bookmark their research and the references get stored in a on-line (available to all) TW. Obviously that TW could soon get rather large and very slow every time you want to make a bookmarks, in order to study the references being generated, my students DONT access this TW. they access another one... which on opening reads the references from the bookmarklet TW.so the References TW gets big with references (they anticipate that this may delay a little to open)and the bookmarklet TW keeps getting cleaned up (at the moment a manual process) and kept small and light. Actually the whole set up is very simple and uses no fancy coding, EXCEPT for a little gem of inspiration from Eric.. the HTML form that opens in the new page ends with the code - .. store.saveTiddler(title,title,text,who,when,etiquetas,fields); autoSaveChanges(); '/form/htmlscript var form=place.lastChild.getElementsByTagName('form')[0]; form.title.value=config.options.txtTitle; form.url.value=config.options.txtFonte; form.pub.value=config.options.txtDominio; form.citado.value=config.options.txtCitado; /script that last bit of script is the magic - it takes the information passed by the bookmarklet and puts it into the HTML form above !! For me that's the Magic that makes this idea work Thanks Eric Thanks All Skye Em segunda-feira, 27 de agosto de 2012 02h27min02s UTC-3, whatever escreveu: Can you describe your solution in more detail? Perhaps share the setup? I think this will be interesting to many people. w On Aug 26, 10:43 pm, skye riquelme riquelme.s...@gmail.com wrote: Hi All Actually I finally resolved my problem.. the bookmarklet code now reads - javascript:void(window.open(' http://mydomain/bookmarking/en.html#txtFonte:[['+location.href+']]%20txtTitle:[['+document.title+']]%20txtDominio:[['+window.location.hostname+']]http://mydomain/bookmarking/en.html#txtFonte:[[%27+location.href+%27]]%20txtTitle:[[%27+document.title+%27]]%20txtDominio:[[%27+window.location.hostname+%27]] %20txtCitado:[['+window.getSelection()+']]','','width=400,height=400,toolbar=yes,titlebar=yes')); Note that the javascript starts with void(...)...seems that makes all the difference The target of this script is a very simple TW sitting on my server. The TW is armed with UploadPlugin and UploadTiddlerPlugin (and therefor PasswordPlugin as well) from BidiXTW works greatfor me!! Thanks Skye Em domingo, 26 de agosto de 2012 16h22min24s UTC-3, whatever escreveu: Hi! Are you using a server-side solution for your setup (TiddlyWeb, TiddlySpace...) or a normal TW on a net-share? I tried getting BookmarksPlugin (1) to work with TiddlyWeb, but I couldn't quite make it work (2). (1)http://bookmarksplugin.tiddlyspace.com/ (2) http://groups.google.com/group/tiddlywiki/browse_thread/thread/342ded... w On Aug 24, 9:20 pm, skye riquelme riquelme.s...@gmail.com wrote: Hi All, I am a great fan of TiddlySnip, but have difficulties in having it store my favoriites to an on-line TW (in principle this is possible using UploadPlugin recently that cant be done from a local TW to an onçine TW). So, I have started playing with an alternative. What I have to date is a bit o javascript in a bookmerklet that passes the selected url and title to a TW on my server.so far so good. Its working and storing my references on-line My code is siimply - javaascript:var%20address=location.href;var%20title=document.title;window.open('
[tw] Re: Help with javascript new.window
Hi! Are you using a server-side solution for your setup (TiddlyWeb, TiddlySpace...) or a normal TW on a net-share? I tried getting BookmarksPlugin (1) to work with TiddlyWeb, but I couldn't quite make it work (2). (1) http://bookmarksplugin.tiddlyspace.com/ (2) http://groups.google.com/group/tiddlywiki/browse_thread/thread/342ded74e628a5c4/3f274e1edbb1fc9b w On Aug 24, 9:20 pm, skye riquelme riquelme.s...@gmail.com wrote: Hi All, I am a great fan of TiddlySnip, but have difficulties in having it store my favoriites to an on-line TW (in principle this is possible using UploadPlugin recently that cant be done from a local TW to an onçine TW). So, I have started playing with an alternative. What I have to date is a bit o javascript in a bookmerklet that passes the selected url and title to a TW on my server.so far so good. Its working and storing my references on-line My code is siimply - javaascript:var%20address=location.href;var%20title=document.title;window.open('http://mydomain.org/bookmarking/marking.html#txtFonte:[['+address+']]%20txtTitle:[['+title+']]','','width=300,height=400,toolbar=yes,titlebar=yes'); The only problem is that when I hit the bookmarklet from a selected page. a new window opensAND the selected page goes blanck and gives the message [object Window].after confirming the save in the new windowI can backup to the original page but thats rather annoying. Why is this code opening a new window AND passing this message to the open page...and how to stop this happening? Thanks in advance Skye -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: Help with javascript new.window
Hi All Actually I finally resolved my problem.. the bookmarklet code now reads - javascript:void(window.open('http://mydomain/bookmarking/en.html#txtFonte:[['+location.href+']]%20txtTitle:[['+document.title+']]%20txtDominio:[['+window.location.hostname+']] %20txtCitado:[['+window.getSelection()+']]','','width=400,height=400,toolbar=yes,titlebar=yes')); Note that the javascript starts with void(...)...seems that makes all the difference The target of this script is a very simple TW sitting on my server. The TW is armed with UploadPlugin and UploadTiddlerPlugin (and therefor PasswordPlugin as well) from BidiXTW works greatfor me!! Thanks Skye Em domingo, 26 de agosto de 2012 16h22min24s UTC-3, whatever escreveu: Hi! Are you using a server-side solution for your setup (TiddlyWeb, TiddlySpace...) or a normal TW on a net-share? I tried getting BookmarksPlugin (1) to work with TiddlyWeb, but I couldn't quite make it work (2). (1) http://bookmarksplugin.tiddlyspace.com/ (2) http://groups.google.com/group/tiddlywiki/browse_thread/thread/342ded74e628a5c4/3f274e1edbb1fc9b w On Aug 24, 9:20 pm, skye riquelme riquelme.s...@gmail.com wrote: Hi All, I am a great fan of TiddlySnip, but have difficulties in having it store my favoriites to an on-line TW (in principle this is possible using UploadPlugin recently that cant be done from a local TW to an onçine TW). So, I have started playing with an alternative. What I have to date is a bit o javascript in a bookmerklet that passes the selected url and title to a TW on my server.so far so good. Its working and storing my references on-line My code is siimply - javaascript:var%20address=location.href;var%20title=document.title;window.open(' http://mydomain.org/bookmarking/marking.html#txtFonte:[['+address+']]%20txtTitle:[['+title+']]http://mydomain.org/bookmarking/marking.html#txtFonte:[[%27+address+%27]]%20txtTitle:[[%27+title+%27]]','','width=300,height=400,toolbar=yes,titlebar=yes'); The only problem is that when I hit the bookmarklet from a selected page. a new window opensAND the selected page goes blanck and gives the message [object Window].after confirming the save in the new windowI can backup to the original page but thats rather annoying. Why is this code opening a new window AND passing this message to the open page...and how to stop this happening? Thanks in advance Skye -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/60JL9dr5nR8J. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.
[tw] Re: Help with javascript new.window
Can you describe your solution in more detail? Perhaps share the setup? I think this will be interesting to many people. w On Aug 26, 10:43 pm, skye riquelme riquelme.s...@gmail.com wrote: Hi All Actually I finally resolved my problem.. the bookmarklet code now reads - javascript:void(window.open('http://mydomain/bookmarking/en.html#txtFonte:[['+location.href+']]%20txtTitle:[['+document.title+']]%20txtDominio:[['+window.location.hostname+']] %20txtCitado:[['+window.getSelection()+']]','','width=400,height=400,toolbar=yes,titlebar=yes')); Note that the javascript starts with void(...)...seems that makes all the difference The target of this script is a very simple TW sitting on my server. The TW is armed with UploadPlugin and UploadTiddlerPlugin (and therefor PasswordPlugin as well) from BidiXTW works greatfor me!! Thanks Skye Em domingo, 26 de agosto de 2012 16h22min24s UTC-3, whatever escreveu: Hi! Are you using a server-side solution for your setup (TiddlyWeb, TiddlySpace...) or a normal TW on a net-share? I tried getting BookmarksPlugin (1) to work with TiddlyWeb, but I couldn't quite make it work (2). (1)http://bookmarksplugin.tiddlyspace.com/ (2) http://groups.google.com/group/tiddlywiki/browse_thread/thread/342ded... w On Aug 24, 9:20 pm, skye riquelme riquelme.s...@gmail.com wrote: Hi All, I am a great fan of TiddlySnip, but have difficulties in having it store my favoriites to an on-line TW (in principle this is possible using UploadPlugin recently that cant be done from a local TW to an onçine TW). So, I have started playing with an alternative. What I have to date is a bit o javascript in a bookmerklet that passes the selected url and title to a TW on my server.so far so good. Its working and storing my references on-line My code is siimply - javaascript:var%20address=location.href;var%20title=document.title;window.open(' http://mydomain.org/bookmarking/marking.html#txtFonte:[['+address+']]%20txtTitle:[['+title+']]http://mydomain.org/bookmarking/marking.html#txtFonte:[[%27+address+%27]]%20txtTitle:[[%27+title+%27]]','','width=300,height=400,toolbar=yes,titlebar=yes'); The only problem is that when I hit the bookmarklet from a selected page. a new window opensAND the selected page goes blanck and gives the message [object Window].after confirming the save in the new windowI can backup to the original page but thats rather annoying. Why is this code opening a new window AND passing this message to the open page...and how to stop this happening? Thanks in advance Skye -- You received this message because you are subscribed to the Google Groups TiddlyWiki group. To post to this group, send email to tiddlywiki@googlegroups.com. To unsubscribe from this group, send email to tiddlywiki+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.