Thank you for replying.
Here are the changes I made after your suggestions. I hope this is
what you were talking about.
<script>
var domain=location.href;
var junk = domain.substr(29);
document.write("https://hfdev1.fhlmc.com/rw"+domain)
function test() {
location.href="https://hfdev1.fhlmc.com/rw"+domain
}
</script>
we are migrating our webapp to a new junction. our endusers access
html files via urls similar
to the following url:
https://www.fhlmc.com/swebapps/sell/...svcr/test.html
our new url path for this same file is at:
https://www.fhlmc.com/rw/docs/mf_svcr/test.html
in case you are wondering, the files were copied over to the new
junction.
what i would like to do is to grab the following
part from the old url:
"/docs/mf_svcr/test.html"
and append it to the new url:
"https://www.fhlmc.com/rw" + "/docs/mf_svcr/test.html"
once I have that done, I would like to redirect
the user to that page. So, all of this happens
behind the scenes.
Would this be possible?
Thanks,
Slash
"McKirahan" <Ne**@McKirahan.com> wrote in message news:<ktLDb.130599$_M.672066@attbi_s54>...
"slash" <sa*****@gwu.edu> wrote in message
news:30**************************@posting.google.c om... Hi,
I am new to JavaScript and I have been sifting through the previous
posts about some specific help I need with a redirect problem. No luck
there! Could someone take a look and give me some suggestions. I could
really use some help.
What I am trying to accomplish is the following:
-grab the user bookmarked URL.
-strip some of the URL from the beginning
-pass what's leftover of the URL and append that to a new URL.
-i would then like to call this function in the body tag and pass it
to onLoad
<HEAD>
<script>
var domain=window.location.href;
var domain2 = domain.substr(0,29);
document.write("https://hfdev1.test.com/rw"+domain2")
function test() {
document.location.href="https://hfdev1.test.com/rw"+domain2"
}
</script>
</HEAD>
<body onload="test()">
Thanks,
Slash
Looks like you're on the right track.
However, you should
a) remove the quotation mark after all references to "domain2"
b) remove the prefixes from all references to "location.href".
Could you provide a better example of what you're trying to do?
-grab the user bookmarked URL.
Is this the full URL that invoked the page?
-strip some of the URL from the beginning
What is "some of"? Is the the page's filename?
-pass what's leftover of the URL and append that to a new URL.
What's the format of the new URL?
Are you passing the "some of" as a querystring?
Give the following URL:
http://{domain}/{folder}/page.htm
what do you want stripped out for later use?