I have found two bookmarlets that can take formatted text from the clipboard and fill a form on another page. This works even cross domain and cross browsers. The problem is that bookmarklet "B" cannot fill the same form that "A" can.
Leaving the only real problem with bookmarklet "A" being that it has a paste the clipboard inbox that bookmarklet "B" doesn't have to show but falls back on if necessary.
Good page to test these bookmarlets on: google.com/advanced_search
Bookmarklet "A" Source: http://wundes.com/bookmarklets.html (BTW it does work in IE despite the page saying it won't.)
javascript:function%20repop(){var%20j,A="",D,E,F=document.forms,G="",div="~::~",H,FA=[],TA=[],DF=[],DA=[];H=prompt("Paste-Form-Vars-Here","");K=H.split("~jdiv~");while(K.length>0){var%20L=K.shift().split(div);mypush(L,FA);}var%20alen=FA.length;for(var%20c=0;c<alen;c++){TA[c]=[];addtypes(FA[c],TA[c]);}for(all%20in%20FA){addObj(FA[all],TA[all]);}for(var%20eff%20in%20TA){for(var%20o%20in%20TA[eff]){for(var%20i%20in%20TA[eff][o].objArr){var%20fl=F[eff].length;for(var%20df=0;df<fl;df++){var%20dff=F[eff][df];var%20taf=TA[eff][o].objArr[i];if(dff.name==taf[1]){if(taf[2].length==0||taf[2].length==undefined){taf[2]="";}dff.value=taf[2];}}}}}}repop();void(null);function%20addObj(obj,ElArr){for(i%20in%20obj){for(var%20e%20in%20ElArr){if(obj[i][0]==ElArr[e].name){ElArr[e].objArr.push(obj[i]);break;}}}}function%20mypush(a,Ar){var%20n=a.shift();if(Ar[n]==undefined){Ar[n]=[];}Ar[n].push(a);}function%20addtypes(a,Ar){for(var%20e%20in%20a){var%20t=a[e][0];if(elemIndexOf(t,Ar)==-1){var%20bob=new%20Elemental(t,[]);Ar.push(bob);}}}function%20elemIndexOf(s,a){var%20ln=a.length;for(var%20x=0;x<ln;x++){if(a[x].name==s){return(x);}}return(-1);}function%20Elemental(name,objArr){this.name=name;this.objArr=objArr;}
The clipboard content it is expecting needs to look like:
0~::~text~::~jdiv~0~::~text~::~as_eq~::~If you see this the bookmarklet worked!~jdiv~
Bookmarklet "B" Source: https://github.com/cvuorinen/my-bookmarklets/tree/master/form-populate
javascript:(function(){t='';c=window.clipboardData;if(c){t=c.getData('Text');}if(!t){t=window.prompt('Paste:');}p=t.split('|');t=p.shift();t=t.split(';');v=t[0].split(':');f=t[1].split(':');l=v.length;d=((f.length>l+1)?'window.'+f[l+1]+'.':'')+'document.'+f[l]+'.';for(i=0;i<l;i++){eval(d+f[i]).value=v[i];}p=p.join('|');if(c){c.setData('Text',p);}else if(p){window.prompt('Copy:',p);}})();
The clipboard content it is expecting needs to look like:
If you see this the bookmarklet worked!;as_eq:f
I honestly don't know javascript and I have spent well over 50 hours trying to research a way to transfer form data cross domain without a webserver.
Its easy enough to make my page1 (that is in my control generate the clipboard) Issue has been making the 2nd page as easy as possible to use.
I really think this is possible to do but not sure how to modify bookmarlet "A" to act like "B" does with the copy from clipboard. If I have to live with "A" I will be ok but my final solution will be so much better if I can avoid the ctrl-v step and make it a two click solution.
Thanks in advance for any assistance.
Update: 4/14/16 after using IE developer tools I found the culprit. It had something to do with the t variable.
'javascript:function%20repop(){var%20j,A="",t,D,E,F=document.forms,G="",div="~::~",H,FA=[],TA=[],DF=[],DA=[],c;%20%20c=window.clipboardData;%20%20if%20(c)%20{%20%20%20%20H=c.getData('Text');}K=H.split("~jdiv~");while(K.length>0){var%20L=K.shift().split(div);mypush(L,FA);}var%20alen=FA.length;for(var%20c=0;c
This bookmarklet as long as you have the form content already on the clipboard in the format that the original copy bookmarklet makes (see more at the bookmarklet A source previously mentioned) then this revised bookmarklet will fill it in.