Re: JavaScript possibilities

2010-06-20 Thread Jordan Knight
Yeah tis IE only.

Flash can/could do it... I think it's been removed in later versions of
browsers? I dunno - I just know it doesn't work very well cept in IE :)

Cheers,

JK

On Mon, Jun 21, 2010 at 10:57 AM, Greg Keogh  wrote:

>  Jordan, searches for “JavaScript Clipboard” produce a lot of results that
> use code like the following:
>
>
>
> 
>
>
>
> 
>
> function toClipboard(message) {
>
> holdtext.innerText = message;
>
> var copied = holdtext.createTextRange();
>
> copied.execCommand("Copy");
>
> }
>
> 
>
>
>
> In my IE8 dev machine this ugly code actually works, but I seriously doubt
> it will be browser neutral. Anyway, it will be suitable for the upcoming
> demo. One of the C++ guys reckons he’s crash hot with JavaScript, so I’ll
> tell him this works and I’ll leave it to him to do magic with the script and
> the XML I’ve placed on the Clipboard.
>
>
>
> I’ll let you know if I find anything more generally useful on the subject.
>
>
>
> Greg
>
> ___
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
>
>
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


RE: JavaScript possibilities

2010-06-20 Thread Greg Keogh
Jordan, searches for “JavaScript Clipboard” produce a lot of results that use 
code like the following:

 



 



function toClipboard(message) {

holdtext.innerText = message;

var copied = holdtext.createTextRange();

copied.execCommand("Copy");

}



 

In my IE8 dev machine this ugly code actually works, but I seriously doubt it 
will be browser neutral. Anyway, it will be suitable for the upcoming demo. One 
of the C++ guys reckons he’s crash hot with JavaScript, so I’ll tell him this 
works and I’ll leave it to him to do magic with the script and the XML I’ve 
placed on the Clipboard.

 

I’ll let you know if I find anything more generally useful on the subject.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


Re: JavaScript possibilities

2010-06-20 Thread Jordan Knight
Hey,

I believe that you van only do clipboard stuff in i.e. (it has  
clipboard stuff On the global object from memory) Sl4 full trust will  
be fine at any time (It should also be able to do office automation  
etc too)

Cheers,

Jordan

On 21/06/2010, at 9:07 AM, "Greg Keogh"  wrote:

> Folks, my Silverlight 3 app is a lightweight version of a gigantic  
> windows app written in C++, and the authors of that app want my SL3  
> app to simulate the “export” facility of its big brother, which  
> sends data to the Clipboard, to a new browser window or to Office ap 
> ps via automation.
>
>
>
> I explained to them SL3 is mostly deaf, dumb and blind on the client  
> machine, and as far as I know the only way it can talk to the client  
> is by invoking JavaScript methods. I see that SL4 can work with the  
> Clipboard, but it will be several weeks or more before I migrate up  
> to VS2010, Framework 4 and SL4.
>
>
>
> I’m already calling JavaScript methods in the browser for trivial pu 
> rposes, so I can pass huge strings of XML into JavaScript methods as 
>  well. I’m not up-to-date with JavaScript and I was wondering if it  
> has any power act as a kind of trusted intermediary to allow the SL3 
>  app to send XML to the Clipboard, browsers or automated Office apps 
> . Has anyone done this sort of thing?
>
>
>
> In the meantime I’ll keep web searching for articles on this matter.
>
>
>
> Greg
>
> ___
> ozsilverlight mailing list
> ozsilverlight@ozsilverlight.com
> http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight


JavaScript possibilities

2010-06-20 Thread Greg Keogh
Folks, my Silverlight 3 app is a lightweight version of a gigantic windows
app written in C++, and the authors of that app want my SL3 app to simulate
the "export" facility of its big brother, which sends data to the Clipboard,
to a new browser window or to Office apps via automation.

 

I explained to them SL3 is mostly deaf, dumb and blind on the client
machine, and as far as I know the only way it can talk to the client is by
invoking JavaScript methods. I see that SL4 can work with the Clipboard, but
it will be several weeks or more before I migrate up to VS2010, Framework 4
and SL4.

 

I'm already calling JavaScript methods in the browser for trivial purposes,
so I can pass huge strings of XML into JavaScript methods as well. I'm not
up-to-date with JavaScript and I was wondering if it has any power act as a
kind of trusted intermediary to allow the SL3 app to send XML to the
Clipboard, browsers or automated Office apps. Has anyone done this sort of
thing?

 

In the meantime I'll keep web searching for articles on this matter.

 

Greg

___
ozsilverlight mailing list
ozsilverlight@ozsilverlight.com
http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight