iframes and anchor tags

I am very new to iframes. I hope I can explain myself well enough.<br />
My problem is this: My boss wants me to use anchor tags to enable the user to get to a particular section of the page. Like this: (a href=http://www.htmlforums.com/archive/index.php/"page.php#whatever"). I get that part. I have a menu on the left side with a button that has a pop-up menu. Here is where the problem comes in. When a user clicks on an option in the pop-up menu for Facilities, the page in the iframe just sits there and does nothing.<br />
<br />
<!-- m --><a class="postlink" href="http://design.ctii.com/nocp/3/facilities.php">http://design.ctii.com/nocp/3/facilities.php</a><!-- m --><br />
<br />
What do i need to put in the href attribute to make it go to a particular section in the page in the src of the iframe?<br />
<br />
<br />
Thanks,<br />
<br />
gothwench<!--content-->You must set the target attribute of the link to go the iframe!<!--content--><a href=http://www.htmlforums.com/archive/index.php/"page.php#whatever" target="iframe_name_here"><!--content-->Thank you. I have got that to work with an anchor tag, but I am having trouble using it in the pop-up menu which uses "location" to direct the page. The line of code reads:<br />
<br />
("location='facilities.php#storyland'","target='facs'")<br />
<br />
However, facilities.php isn't the name of the file that is the src in the iframe. Facilities.php is the entire page for the site, including the header, navigation menu and footer. So I tried to replace that name with the name of the file that is the src in the iframe. <br />
<br />
("location='facilities.html#storyland'","target='facs'")<br />
<br />
When I did that, it found the anchor fine, but it showed only the facilites.html page, not all of the other parts that I need it to show that are located in facilities.php.<br />
<br />
Is this just impossible to do? A co-worker of mine said you can't use target attribute with Javascript that uses "location". <br />
<br />
I would be willing to attach some files, but I am unsure which ones you'd need to see. And it seems I can only do one per post.<!--content-->that is true, you can't use target in javascript like that. you will have to find another way if you do it in a popup.<!--content-->
 
Back
Top