Solved

Compound links

Posted on 2002-05-31
4
134 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Specific DIV Hyperlink Color 1 39
css, html 6 29
jQuery value within div undefined 3 20
Modify Table Width 6 13
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…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now