D
daniel_of_vienna
Hello,
thisi s my first (okay 2nd) try with JavaScript.
I have the following issue:
I've made a MenuExt for Internet Explorer wich calls a .js. This gets
the "external.menuArguments.event.srcElement.innerHTML" of the user is
hovering with the Mouse.
in the next step I put this to the Clipboard.
The working code:
<script type="text/javascript">
var str = external.menuArguments.event.srcElement.innerHTML;
window.clipboardData.setData ("Text", (str));
</script>
The Challenge (at least for me... ):
in this string somewhere is a 9-digit number, and exactly this I
needed on the Clipboard.....
I've read about RegExp and I guess this shall work:
var srch = /\d {9}/g;
var str2 = srch.exec(str);
But since this is not a String output, I cannot put it to the
Clipboard.... (I think so...)
Could someone please help?
Thanks in advance,
Daniel
thisi s my first (okay 2nd) try with JavaScript.
I have the following issue:
I've made a MenuExt for Internet Explorer wich calls a .js. This gets
the "external.menuArguments.event.srcElement.innerHTML" of the user is
hovering with the Mouse.
in the next step I put this to the Clipboard.
The working code:
<script type="text/javascript">
var str = external.menuArguments.event.srcElement.innerHTML;
window.clipboardData.setData ("Text", (str));
</script>
The Challenge (at least for me... ):
in this string somewhere is a 9-digit number, and exactly this I
needed on the Clipboard.....
I've read about RegExp and I guess this shall work:
var srch = /\d {9}/g;
var str2 = srch.exec(str);
But since this is not a String output, I cannot put it to the
Clipboard.... (I think so...)
Could someone please help?
Thanks in advance,
Daniel