.js link to go back one level

S

Shehbaz Afzal

Hi

I am trying to force a .js script to execute a link from up one level rather
than from the current location, for example inseatd of running the link from
'\services' i'd like it to run the link from '\offers\services'. The script
is below...

function move_menu(num)
{
switch(num)

{

case 1:window.location="services" ;break;

}
}

'Services' in the script is a folder which contains a 'default.htm' file. I
have tried to add a / and ../ to get the link to move up one level but now
joy, can anyone help please?

Many thanks
 
J

Jon Spivey

Hi,
have you tried
case 1:window.location="../offers/services" ;break;

Cheers,
Jon
 
S

Shehbaz Afzal

thank you gents, yes i tried both suggestions but upon doing either the
yellow error triangle appears in the browser status bar.
 
S

Shehbaz Afzal

i cleared out the local cache and tried your suggestions again, but the link
again tries to go a folder ahead, i.e. offers/services/services instead of
going back one in to just /offers/services.

Many thanks
 
S

Shehbaz Afzal

i tried the URL path but for some reason added the /wwwroot/ in as well and
it didnt work off course!

the absolute URL has worked as suggested.

Many, many thanks
 

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

Top