![]() ![]() |
Hello,
This information is a piece of string placed into a variable.
Now inside of the whole GM_xmlhttpRequest - routine I can change/use... it. BUT I need it in another part of the script outside of this routine.
How can I make (export/transfer) a result from an xmlhttpRequest be available in the later script? greets ~ V |
![]() ![]() |
var r=''; function test(){
GM_xmlhttpRequest({
|
![]() ![]() |
Thanks for your quick reply - and sorry that it took you 2 minutes time. I have been searching many scripts and references, also the guide etc. but I won't ask g00gle. Ok - trying your example (with a different url) and appending
|
![]() ![]() |
that's because GM_xmlhttpRequest is asynchronous
|
![]() ![]() |
Yes - I wrote it above - I have no problem INSIDE GM_xmlhttpRequest but I need the result in another part of the script. |
![]() ![]() |
use callbacks, events, things like that
|
![]() ![]() |
Great - a completely different topic to work through - so some more days until that (incl. all ref-links ect.) again is grasped. And then search for the hidden connection to xmlhttpRequest .... That's what I'm doing all the time - and when I'm so stuck like now I dare to ask this forum.
------------- later: Got it - explanation follows after break |
![]() ![]() |
If you want to make a variable global from inside a function, just use
|



