Displaying Image on a Form

 1 Replies
 2 Subscribed to this topic
 12 Subscribed to this forum
Sort:
Author
Messages
Eddie Smith
Advanced Member Send Private Message
Posts: 39
Advanced Member

We have a custom IC12.1 form that will display the item image when the user performs an Inquiry. However, we would like to have the images to display as well when the user inquires using previous and next function. Is there some JAVA scripting that can be used for this? We are currently using the following JAVA script to display the item image.

function FORM_OnAfterTransaction(data) { //was transaction successful? if (formState.agsError) return; // build image URL and set the image control source  if (lawForm.getFormValue("text3").length > 0)  {    sItem = lawForm.getFormValue("text3");  sPath = "http://rhqnlaw2.universalleaf.com/servlet/FileMgr?action=get&folder=/lawson/portal/content/images&name="  var imgElem=lawForm.getFormElement("image1");   if (imgElem)   {   imgElem.src = sPath;   imgElem.style.visibility = "visible";   }  } }

 

David Williams
Veteran Member Send Private Message
Posts: 1127
Veteran Member
Use lawForm.getDataValue instead of getFormValue and your Previous and Next condition should work too.
David Williams