• Aliaksandr Vishneuski
  • NEWBIE
  • 5 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Is there any other difference between master detail and lookup relationships outside of ownership behavior, security implications, and referential integrity between the objects?

Thanks,
Joe

Hi,

 

 Is there a way to capture the fileName in the apex:inutFile after choosing the file and default it to the value in the apex:inputField? I am doing below (snippet) but i get the file name as undefined all the time - any idea why or any other better way of doing it?

 

<script>

 function defaultName()

{
   var fileName2 = document.getElementById("thePage:theForm:fileInput");
   var documentName = document.getElementById("thePage:theForm:docName");
   documentName.value = fileName2.value;  ------> I get undefined here?? How do i get the fileName???
   return true;
}

</script>

<apex:inputFile value="{!con}" contentType="{!type}" fileName="{!name}" id="fileInput" onchange="javascript&colon;defaultName()"/>

<apex:inputField value="{!docName}" id="docName"/>

 

thanks so much.