importing a jpg url

Bringing your stacks to the web

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

importing a jpg url

Post by adventuresofgreg » Fri Sep 11, 2015 11:12 pm

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?

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: importing a jpg url

Post by adventuresofgreg » Sat Sep 12, 2015 2:05 pm

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?

adventuresofgreg
Posts: 349
Joined: Tue Oct 28, 2008 1:23 am
Contact:

Re: importing a jpg url

Post by adventuresofgreg » Sat Sep 12, 2015 4:18 pm

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?

Post Reply

Return to “HTML5”