Displaying Image on a Form

Sort:
You are not authorized to post a reply.
Author
Messages
Eddie Smith
Advanced Member
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
    Posts: 1127
    Veteran Member
      Use lawForm.getDataValue instead of getFormValue and your Previous and Next condition should work too.
      David Williams
      You are not authorized to post a reply.