MsFox
asked on
Hide part of the querystring
Hello all,
I have a javascript that calls an asp pages which in turn calls the same javascript.
SECUREINDEX.JS
var urlList;
var topstr = new String(top.location.search );
var topparamList = topstr.split("?");
var Authpos = topstr.indexOf("AuthPostBa ck");
if (Authpos>0) {}
else {
var urlList = topparamList[1].split("&") ;
location = '/INTRANET/PRODUCTION/mm4a pplication s/ConfigFi les/Secure Access/Sec ureIndexCo nfig.asp?P age='+ urlList[1] ;
}
Here, I'm checking for the occurence of 'AuthPostBack' in the querystring. If there's none, then call the asp page.
My asp page contains code that checks if user has access after entering the username and password, will display error message if he has no access.
SECUREINDEXCONFIG.ASP (html part)
<BODY >
<form name="ConfigForm" action="http://sydintra01/intranet/firm/me.get?site.sitelayouts.home&<%=request.queryst ring("Page ")%>&AuthP ostBack=tr ue" method = "post" target=_top >
</form>
<script language="javascript">
self.document.ConfigForm.s ubmit();
</script>
</BODY>
The action is just a call to our CMS page that calls SecureINdex.js. My objective is to run the asp once and stops execution in the js file. So you will notice that in SecureIndex, it will stop execution because Authpos>0 will be true.
Since in the js, I am parsing the querystring returned (using top.location.search), is it possible to hide the &AuthPostBack=true querystring.
This is already working, I just want to hide from the user the URL
http://sydintra01/intranet/firm/me.get?site.sitelayouts.homeFFFF7918&AuthPostBack=true
and instead only show
http://sydintra01/intranet/firm/me.get?site.sitelayouts.homeFFFF7918
Thanks all.
I have a javascript that calls an asp pages which in turn calls the same javascript.
SECUREINDEX.JS
var urlList;
var topstr = new String(top.location.search
var topparamList = topstr.split("?");
var Authpos = topstr.indexOf("AuthPostBa
if (Authpos>0) {}
else {
var urlList = topparamList[1].split("&")
location = '/INTRANET/PRODUCTION/mm4a
}
Here, I'm checking for the occurence of 'AuthPostBack' in the querystring. If there's none, then call the asp page.
My asp page contains code that checks if user has access after entering the username and password, will display error message if he has no access.
SECUREINDEXCONFIG.ASP (html part)
<BODY >
<form name="ConfigForm" action="http://sydintra01/intranet/firm/me.get?site.sitelayouts.home&<%=request.queryst
</form>
<script language="javascript">
self.document.ConfigForm.s
</script>
</BODY>
The action is just a call to our CMS page that calls SecureINdex.js. My objective is to run the asp once and stops execution in the js file. So you will notice that in SecureIndex, it will stop execution because Authpos>0 will be true.
Since in the js, I am parsing the querystring returned (using top.location.search), is it possible to hide the &AuthPostBack=true querystring.
This is already working, I just want to hide from the user the URL
http://sydintra01/intranet/firm/me.get?site.sitelayouts.homeFFFF7918&AuthPostBack=true
and instead only show
http://sydintra01/intranet/firm/me.get?site.sitelayouts.homeFFFF7918
Thanks all.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
if ("<%=request("AuthPostBack
else {
var urlList = topparamList[1].split("&")
location = '/INTRANET/PRODUCTION/mm4a
}
ASKER