Home
Content Management (Extended ECM)
API, SDK, REST and Web Services
NextURL in error.html
Will_Brantley
Good afternoon all,I am trying to expose the NextURL variable to error.html. Any ideas on how to do so?In case anybody is wondering why. I am using the following snippet of JS code to catch an error message returned to error.html. I would like to include the NextURL (if applicable) as a querystring variable in my redirection.if (document.body.innerText.indexOf("Invalid username/password specified" ) != -1) {window.location = '/casper/index.asp?func=noaccount'; }
Find more posts tagged with
Comments
unknown_Support_user
Message from Rick Breemer via eLinkHi there,If the parameter is in the URL, you can retrieve it both with JavaScript orOScript.I assume you are interested in the JavaScript version? The getArguments() function below retrieves and alerts the value of thenexturl parameter.function getArguments() { var argNextUrl = getArgument("nexturl") alert( argNextUrl )}function plusUnescape(str) { // the unescape function won't convert plussigns str = '' + str; // to spaces; like you see in search strings while (true) { var i = str.indexOf('+'); if (i == -1) break; str = str.substring(0,i) + ' ' +str.substring(i+1,str.length); } return unescape(str);}function getArgument (theKey) { var args = new Array (); var argstring = window.location.search; if (argstring.charAt(0) != '?') { return false; // no arguments } argstring = argstring.substring(1, argstring.length); var argarray = argstring.split('&'); for (var i=0; i < argarray.length; i++) { var singlearg = argarray[i].split('='); if (singlearg.length != 2) { continue; // not a valid argument } var argsKey = plusUnescape(singlearg[0]); var argsValue = plusUnescape(singlearg[1]); args [argsKey] = argsValue; } return args[('' + theKey)]}Good luck,Rick BreemerLogicaCMG-----Original Message-----From: eLink Discussion: Development Discussion[mailto:development@elinkkc.opentext.com] Sent: dinsdag 24 mei 2005 22:46To: eLink RecipientSubject: NextURL in error.htmlNextURL in error.htmlPosted by Harrison, Sean on 05/24/2005 04:41 PMGood afternoon all,I am trying to expose the NextURL variable to error.html. Any ideas on howto do so?In case anybody is wondering why. I am using the following snippet of JScode to catch an error message returned to error.html. I would like toinclude the NextURL (if applicable) as a querystring variable in myredirection.if (document.body.innerText.indexOf("Invalid username/password specified" )!= -1) {window.location = '/casper/index.asp?func=noaccount'; } [To reply to this thread, use your normal E-mail reply function.]============================================================Discussion: Development Discussion
https://knowledge.opentext.com/knowledge/livelink.exe?func=ll&objId=786303&objAction=viewLivelink
Server:
https://knowledge.opentext.com/knowledge/livelink.exeThis
e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.