Jump to content
Welcome to the new FusionPro User Forum! ×

Pull Images from website


Recommended Posts

I would expect you to get a syntax error in your rule as posted. You need a couple plus signs in there to concatenate the strings properly in JavaScript:

Pic =  CreateResource("http://assets.lincolnelectric.com/assets/en_US/Products/" [color=DarkRed][b]+[/b][/color] Field("MATERIAL") [color=DarkRed][b]+[/b][/color] "/1200x1200.jpg", "graphic", true);

Also, you can't test for the existence of a graphic resource from the Internet with the .exists property, since the file is not downloaded until it's used. So the rule should just be one line like this:

return CreateResource("http://assets.lincolnelectric.com/assets/en_US/Products/" + Field("MATERIAL") + "/1200x1200.jpg");

You can always place the "photo not available" picture in a separate graphic frame below the one which gets the picture from the Internet, so it gets covered up when the online resource is found.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...