PDA

View Full Version : Site Map Problem


esm
01-13-2005, 05:47 PM
Hi,

I am trying to find a solution for the following problem:

1 I have a web page (e.g. page1) whose varying content (e.g. content1) is opened inside an iframe. The bulk of the page stays the same but the content in the iframe is always different.
2 I am building a site map.
3 In the sitemap, when I click on the page1 link, it pops up with the default (content1) in the iframe. So far so good.
4 When I call content2 from the site map, it should replace content1 in the iframe of page1 but it pops up as a separate page without page1 surrounding it.

Does this explanation make sense? Is there any way to call the content2 page so it pops up inside the iframe of page1?

Thanks a lot,

Ed

Kor
01-13-2005, 06:25 PM
give your iframe a name

<iframe name="myiframe" src="initialpage.html"></iframe>

HTML solution


<a href ="content1.html" target="myiframe">content1</a>
<a href ="content2.html" target="myiframe">content2</a>

- take care to have a proper doctype in the top of your page, ie:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

javascript solution

<a href ="#" onclick="top.frames['myiframe'].location.href='content1.html';return false">content1</a>
<a href ="#" onclick="top.frames['myiframe'].location.href='content2.html';return false">content2</a>

esm
01-13-2005, 06:43 PM
Hi Kor,

Thanks for the quick response. I am trying to use the free TIGRA Tree Menu and their syntax is something like this:

['Content2', 'page1.htm target=iframe1'],

except that it doesn't work. I'm a JS novice and I'm sure that this line is totally wrong.

Kor
01-13-2005, 06:56 PM
somewere in code might be something like

window.open(a_parameter)

try to locate it and insert

window.open(a_parameter,'iframename')

as the method is

window.open(location, target, otherattributes)

esm
01-13-2005, 07:23 PM
No, this string is not in the code.

Kor
01-14-2005, 09:11 AM
can u point me to that js files of your menu?

esm
01-14-2005, 03:44 PM
You can find the js file here:

http://www.softcomplex.com/products/tigra_tree_menu/

Thanks again for your help.