Switch between Secure and Non-Secure ports without losing exchanged fields (including hidden)

Date:Archived
Product/Release:LANSA for the Web
Abstract:Switch between Secure and Non-Secure ports without losing exchange field (including hidden fields).
Submitted By:Madan Divaker

There are two ways of achieving this result without losing any of the exchange fields including hidden fields.

1. Using Javascript

Change the FORM ACTION to go into and out of HTTPS.

JavaScript to enter SSL mode:

function HandleEventStdRentrySSL(Proc,Func,STDRENTRY)
{
document.LANSA.ASTDRENTRY.value=STDRENTRY;
document.LANSA._PROCESS.value=Proc;
document.LANSA._FUNCTION.value=Func;
var ref = " <https://999.999.999.999:1443/>
https://999.999.999.999:1443";
document.LANSA.action = ref + document.LANSA.action;
document.LANSA.submit();
}

JavaScript to enter Non-SSL mode:

function HandleEventStdRentryNon(Proc,Func,STDRENTRY)
{
document.LANSA.ASTDRENTRY.value=STDRENTRY;
document.LANSA._PROCESS.value=Proc;
document.LANSA._FUNCTION.value=Func;
var ref = " <http://999.999.999.999:1441> http://999.999.999.999:1441";
document.LANSA.action = ref + document.LANSA.action;
document.LANSA.submit();
}