Code: Select all
--original code (only needed three lines) but is synchronous
on mouseUp
put "http://"&tikipp&"/urlsample/" into talldata
put URL talldata into talldata
put jsonimport(talldata) into gArray
end mouseUp
---replaced by asynchronous approach:
on mouseUp
put "http://"&tikipp&"/urlsample/" into talldata
load URL talldata with message "downloadComplete"
end mouseUP
on downloadComplete pURL, pURLStatus
if pURLStatus is "cached" then
put URL pURL into talldata2
put jsonimport(talldata2) into gArray
end if
unload url pURL
end downloadComplete
------
thx in advance.