Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Compound links

Posted on 2002-05-31
4
Medium Priority
?
146 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 400 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
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…

879 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