<%@language = "javascript" %>
<% /*
     $Revision$
     $Id$

    File:               bes_show_item_kenmerk.asp
    Description:        showing result of selected properties
    Parameters:         one of the opdr_key or bes_key should be supplied. If both, opdr_key is used
        srtdeel_key     bestelling group
        objectlength    length obj
        obj             kenmerk information
    Context:            Called from kenmerk_fill.asp
    Note:
*/ %>

<!-- #include file="../Shared/common.inc"-->
<!-- #include file="../Shared/iface.inc" -->

<%
  FCLTHeader.Requires({ plugins:["jQuery"] });

  var srtdeel_key = getQParamInt('srtdeel_key');
%>

<html>
<head>
<%  FCLTHeader.Generate() %>
</head>

<body class="fclt-modal" id="bes_preview" onload="javascript:document.forms.u2.submit();">
<% MODAL_START(); %>
<form name="u2" action="kenmerkresult.asp?srtdeel_key=<%=srtdeel_key%>" target="result" method="POST" onsubmit="return false;">
<% MODAL_BLOCK_START("besViewFlex", L("lcl_bes_preview"), { icon: "fa-image" });%>
<script type="text/javascript">
  var obj = FcltMgr.dialogArguments().objReturn;
  document.writeln("<input type='hidden' id='flex_length' name='flex_length' value='" + obj[0].length + "'>");
  for (var i=0; i<obj[0].length; i++) {
    document.writeln("<input type='hidden' id='flex0_" + i + "' name='flex0_" + i + "' value='" + obj[0][i].replace("'","''") + "'>");
    document.writeln("<input type='hidden' id='flex1_" + i + "' name='flex1_" + i + "' value='" + escape(obj[1][i]) + "'>");
    document.writeln("<input type='hidden' id='flex2_" + i + "' name='flex2_" + i + "' value='" + escape(obj[2][i]) + "'>");
    document.writeln("<input type='hidden' id='flex3_" + i + "' name='flex3_" + i + "' value='" + escape(obj[3][i]) + "'>");
  }
</script>

  <tr>
    <td>
      <iframe id='result' name='result'
              src="../Shared/empty.asp" marginwidth="0" marginheight="0"
              scrolling=no width="400px" height="380" frameborder='0' framespacing='0'
              xxonload='FcltMgr.iframeLoaded(this);'>
      </iframe>

    </td>
  </tr>

<%
MODAL_BLOCK_END();

buttons = [{title: L("lcl_bes_preview_ok"), icon: "fa-fclt-save", action: "FcltMgr.closeDetail(window, { isXmlOk: true})", importance: 1},
           {title: L("lcl_cancel"), icon: "fa-fclt-cancel", action: "FcltMgr.closeDetail(window, { isXmlOk: false });", importance: 3}
          ];
SIMPLE_BLOCK_START();
          CreateButtons( buttons);
SIMPLE_BLOCK_END();

%></form>
<% MODAL_END(); %>
</body>
</html>

<% ASPPAGE_END(); %>
