Solved

Compound links

Posted on 2002-05-31
4
141 Views
Last Modified: 2010-04-09
0
Comment
Question by:Bob Stone
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

617 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