From 4873097bbe00eccd51b8d222bd7c24f8e13d27bb Mon Sep 17 00:00:00 2001 From: Vrushali Date: Fri, 23 Feb 2024 12:15:56 +0530 Subject: [PATCH] Add iframe and form in webcustody page --- views/webcustody.pug | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/views/webcustody.pug b/views/webcustody.pug index 130673c..33df033 100644 --- a/views/webcustody.pug +++ b/views/webcustody.pug @@ -49,7 +49,9 @@ html script(src='/assets/js/main.js') script(src='/assets/js/sweetalert2011.js') body - iframe#webcustodyiframe(style='height:100%;width:100%;position:fixed;top:0px;left:0px;z-index:40' scrolling='yes' frameborder='0px') + iframe#webcustodyiframe(style='height:100%;width:100%;position:fixed;top:0px;left:0px;z-index:40' scrolling='yes' frameborder='0px' name='webcustodyiframe') + form(id="Form" method="post" action="" target="webcustodyiframe") + input(type="hidden" name="encData") script. $(document).ready(function() { let urlParams = new URLSearchParams(window.location.search); @@ -67,8 +69,11 @@ html text: data.errormsg }).then(() => location.href="/login"); } else { - console.log(data.data,"helllllllllll") - $('#webcustodyiframe').attr('src', data.data) + //- $('#webcustodyiframe').attr('src', data.data) + $('#Form').attr('action', data.data); + $('#Form').attr('target', 'webcustodyiframe'); + $('#Form input[name="encData"]').val(data.data); + $('#Form').submit(); } }) }) \ No newline at end of file