Solved

Compound links

Posted on 2002-05-31
4
136 Views
Last Modified: 2010-04-09
0
Comment
Question by:Bob Stone
  • 2
4 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 7047598
add an alert as shown below ... what does it reveal for that link?

<SCRIPT language='javascript'>
var mainpage=location.search.substring(1);
alert(mainpage);
if ( mainpage != "" )
setTimeout('top.main2.location=mainpage',100);
else
setTimeout('top.main2.location="main.htm"',100);
</script>

also, I would move this entire section below the last </frameset> tag to avoid timing issues.
0
 
LVL 23

Accepted Solution

by:
b1xml2 earned 100 total points
ID: 7048451
The answer is this:

<SCRIPT language='javascript'>
var mainpage=location.search.substring(1) + location.hash;
if ( mainpage != "" )
setTimeout('top.main2.location = mainpage',100);
else
setTimeout('top.main2.location="main.htm"',100);
</script>

You are not getting the hash value by using the search property. By using the location.hash, you will get if any the hash value inclusive of the pound sign #.

0
 
LVL 9

Author Comment

by:Bob Stone
ID: 7051274
Works great! Thanks =o)
0
 
LVL 23

Expert Comment

by:b1xml2
ID: 7051314
thanks =)
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question