Page 1 of 1

importing a jpg url

Posted: Fri Sep 11, 2015 11:12 pm
by adventuresofgreg
I can't seem to import a .jpg image into my html5 app. The simple test app loads properly in my Safari browser, but selecting the field line that is supposed to import the graphic generates an error.

if thechoice = "Choice 2" then
put "http://www.bbemuseum.com/museum/images/ ... iplash.jpg" into newpic
set the filename of image "equitysnaptemplate" to newpic
end if

error is "Exception thrown, see JavaScript console"
with a bunch of -12 's in the console

Is there a better way to import pics from a URL?

Re: importing a jpg url

Posted: Sat Sep 12, 2015 2:05 pm
by adventuresofgreg
Also, I tried:

put "http://img4.wikia.nocookie.net/__cb2013 ... l_grin.gif" into newpic
put URL newpic into image "equitysnaptemplate"

And the error I got was:

-12
Assertion failed: undefined

Any ideas? Does the URL that I am trying to import have to be at the same domain as the html file?

Re: importing a jpg url

Posted: Sat Sep 12, 2015 4:18 pm
by adventuresofgreg
I can't even import a text file URL:

if thechoice = "Choice 7" then
put "https://wordpress.org/plugins/about/readme.txt" into NewPic
put URL newpic into field "someText"
end if

Same error. Do you think this has something to do with launching the html page on my local computer, and not using a server?