PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10/13/2014 5:16 PM by  David Williams
Displaying Image on a Form
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Eddie Smith
Private
Private
Advanced Member
(89 points)
Advanced Member
Posts:39


Send Message:

--
10/13/2014 5:01 PM

    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
    Private
    Private
    Veteran Member
    (3076 points)
    Veteran Member
    Posts:1036


    Send Message:

    --
    10/13/2014 5:16 PM
    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.