FrontPage 2002 & JavaScript

  • Thread starter Thread starter Keith
  • Start date Start date
K

Keith

I have written a simple JavaScript routine and have added
it into the HTML generated with FP2002. The script takes
some form data and searches an array based on that data.
Once the data is found in the array, a web address
corresponding to that data is set to a variable.

Here is the problem. I want to change the location, using
JavaScript, to the location gotten from the array. I tried:

location=variable
window.location=variable
location.replace(variable)
window.location.replace(variable)
location.replace(variable, "_parent")

and probably some others.

all that ever happend was a reload of the page, it never
changed the location.

But, when I used window.open(variable) it works fine,
except it opens in a new window. I would like for it to
open in the existing window. Is there something in FP that
prevents me from redirecting the current window through a
script?

Thanks
 
Try document.location = URL;

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
Hey thanks Steve. No, I did not try that. Unfortunately,
I'm not at home right now but, when I get home I will try
it and let you know if that works.
 
Thanks Kevin! Actually, I think I tried it with document
instead of window also. If I did, that didn't work either.
But, I will try it again to make sure and let you know.
Thanks!
 
Thanks to all you guys that replied but, non of the
suggestions worked. I'm a little confused by this
problem. If I happen to figure it out I'll let you know.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top