3.0.0

Tab run forever when locate Tab in frame

frame_main.html
frame_top.html
frame_tab1.html
frame_tab2.html

when I navigate from tab1 to tab2, and then tab2 to tab1, brownser in frame_tab1.html and frame_tab2.html run forever.

This is the source

frame_main.html
<html>

<frameset rows="27%,73%" cols="*">

<frame src="frame_top.html" scrolling="auto" name="frame_top">

<frame src="frame_tab1.html" scrolling="auto" name="frame_tab">
</frameset>

<noframes></noframes>

</html>


frame_top.html
<html>
<body>
</body>
</html>


frame_tab1.html

<html>
<head>
<script src="aw/aw.js"></script>
<link rel="stylesheet" href="aw/aw.css"></link>
</head>

<style>
#myTabs {width: 800px; height: 25px;}
</style>
<script type="text/javascript">

var obj = new AW.UI.Tabs;

obj.setId("myTabs");

obj.setItemText(["tab1", "tab2"]);

obj.setItemCount(2);
obj.setSelectedItems([0]);

obj.onItemClicked = function(event, index){

//window.status = "Item " + index + " clicked"
buttonTabClick(index)
};


var pathname = document.location.pathname;

var contextPath = '/'+(pathname.split('/'))[1]+'/';

function buttonTabClick( index )

{

if( index == 0 ) {

document.forms[0].action = contextPath + "frame_tab1.html";

document.forms[0].submit();


}else if( index == 1 ) {

document.forms[0].action = contextPath + "frame_tab2.html";

document.forms[0].submit();

}

}

</script>

<body>
<form>
<script>document.write(obj);</script>
</form>
</body>
</html>


frame_tab2.html

<html>
<head>
<script src="aw/aw.js"></script>
<link rel="stylesheet" href="aw/aw.css"></link>
</head>
<style>
#myTabs {width: 800px; height: 25px;}
</style>
<script type="text/javascript">

var obj = new AW.UI.Tabs;

obj.setId("myTabs");

obj.setItemText(["tab1", "tab2"]);

obj.setItemCount(2);
obj.setSelectedItems([1]);

obj.onItemClicked = function(event, index){
//window.status = "Item " + index + " clicked"
buttonTabClick(index)
};


var pathname = document.location.pathname;

var contextPath = '/'+(pathname.split('/'))[1]+'/';

function buttonTabClick( index )

{

if( index == 0 ) {

document.forms[0].action = contextPath + "frame_tab1.html";

document.forms[0].submit();


}else if( index == 1 ) {

document.forms[0].action = contextPath + "frame_tab2.html";

document.forms[0].submit();

}

}

</script>
<body>
<form>
<script>document.write(obj);</script>
</form>
</body>
</html>

Please help me.
suzuki Media Labo Co.
November 20,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.