Jump to content

Chrille

Members
  • Content Count

    5
  • Joined

  • Last visited

Posts posted by Chrille


  1. Hi!

    I am trying to change the value of a field in a detailspage on update if  another field is not empty.

    I have this working in a submission form with this code: 

    <script type="text/javascript">  
    
    function function1()
    {  var v3 = '<img src="http://image_url" alt="YES"';
       var v2 = document.getElementById("InsertRecordKontaktad").value;
       if (v2 !="")
    {
    document.getElementById("InsertRecordRingt").value = v3;
    }
    }
    
    document.getElementById("caspioform").onsubmit=function1;

    I have tried the same code in the detailspage but it will not work.

    I have also tried this code:

    <script type="text/javascript">
    
    document.addEventListener('BeforeFormSubmit', function (event) {
    
    
    var v3 = '<img src="http://image_url" alt="YES"';
       var v2 = document.getElementById("InsertRecordKontaktad").value;
       if (v2 !="")
    {
    document.getElementById("InsertRecordRingt").value = v3;
    
    }});
    </script>

    This code will also not work.

    Does anyone have a idea?

    Kind regards/ Christofer 

×
×
  • Create New...