Advertisement

09.13.2008 at 11:20PM PDT, ID: 23729709 | Points: 500
[x]
Attachment Details

Javascript Referrer Question

Asked by tgatif in JavaScript, Web Languages/Standards, Asynchronous Javascript and XML (AJAX)

Hi, I have a complex Java script questions. I am working with an application where I need to alter the logout page to go to a specifc url based on the referring path. Then I need to append some text to it.
I can only work in html/Java script. The output page needs to redirect to a specific page. Thats the goal.
Here you go :)

Now in the code below, document.referrer url will be in this format: https://domian.dd.com/csc/cp9/?cmd=login
The url can also be https://domian2.dd.com/csc/cz9/?cmd=login ect... with the domain info and the part of cp9 and cz9 to be changed only.

What I want is to take the referrer url and remove the /?cmd=login piece and then replace it with:
SITE/NODE/h/?tab=MYPAGE
So the ending url where the page should go to be:
https://domian.dd.com/csc/cp9/SITE/NODE/h/?tab=MYPAGE&ErrorMsg=Invalid ID or Password

How do i do that.

It needs t redirect right away so user would not know. :) or as fast as possible.

Thanks

Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
<html>
<head>
<title>Sign in Error</title>
</head>
<body>
 <script language='Javascript'>
  document.location.href=document.referrer + "&ErrorMsg=Invalid ID or Password"
 </script>
</body>
</html>
[+][-]09.14.2008 at 12:02AM PDT, ID: 22471400

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 12:04AM PDT, ID: 22471406

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 12:08AM PDT, ID: 22471422

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 12:16AM PDT, ID: 22471433

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 01:18AM PDT, ID: 22471524

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 12:25PM PDT, ID: 22473892

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 12:26PM PDT, ID: 22473900

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.14.2008 at 03:33PM PDT, ID: 22474700

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 14-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.15.2008 at 08:31AM PDT, ID: 22479660

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 14-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-43 / EE_QW_2_20070628