Gerard Posted August 9, 2012 Share Posted August 9, 2012 (edited) Hi, I'm doing the exercices in the "FusionPro VDP Creator Rules Guide" and I have a problem with the "Employee ID badges" page 104. When I try to validate the rule that "call" the images, I get this message on the first line (Pic = CreateResource(Field("Last") + ".jpg", graphic) "ReferenceError: graphic is not defined" I don't understand as I have entered the line exactly as it is in the manual (except that I have .jpg files instead of .tif) As I'm "junior" in JavaScript, can someone tell me why I do have this error ? you can see a screen capture here : problem with the link ! the right is : http://gerardteillot.com/errorpict.jpg Thank you for your help ! Gérard. Edited August 9, 2012 by Gerard Quote Link to comment Share on other sites More sharing options...
Dan Korn Posted August 9, 2012 Share Posted August 9, 2012 You need quotes around "graphic". The function takes a string; you're passing it a variable named graphic instead. Try this: Pic = CreateResource(Field("Last") + ".jpg", "graphic"); Quote Link to comment Share on other sites More sharing options...
Gerard Posted August 10, 2012 Author Share Posted August 10, 2012 Thank you Dan, it works perfectly ! page 106 of my Rules guide, the line is corectly typed but jus below, in the screen capture, the quotes are missing. Guess wich of the two lines I was silly copying… Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.