mili
05-29-2003, 06:56 PM
Hello!
I have a page that contains 4 navigation tabs.Each tab loads a form into an iframe.So there are 4 individual html pages.
My questions are:
1. how can I perform a single submit for all these pages.
2. Also, When I tab thro' these tabs, I dont want to lose the values that have already been entered.
Here is how my page looks like:
<html>
<head>
<title> </title>
<script language="JavaScript" type="text/javascript">
<!--//
leftOn = "../images/tab_left_on.gif";
rightOn = "../images/tab_right_on.gif";
leftOff = "../images/tab_left_off.gif";
rightOff = "../images/tab_right_off.gif";
colorOn = "#333366";
colorOff = "#5389BC";
//
function selectTab(tab,cnt) {
for (var j=1; j<=cnt; j++) {
if (j==tab) {
document.images["LTab"+j].src = leftOn;
document.getElementById("Tab"+j).bgColor = colorOn;
document.images["RTab"+j].src = rightOn;
} else {
document.images["LTab"+j].src = leftOff;
document.getElementById("Tab"+j).bgColor = colorOff;
document.images["RTab"+j].src = rightOff;
}
}
return true;
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" >
<br>
<table width="600" align="center">
<tr>
<td>Enter Definitions for each Tab :</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" align="center" cellspacing="0" width="600">
<tr valign="top">
<td width="8" bgcolor="#333366"><img name="LTab1" src="../images/tab_left_on.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab1" width="137" valign="middle" bgcolor="#333366" align="center"><a onclick="return selectTab(1,4);" href="header_top.html" target="content" class="tablink"><font color="white">»</font> Form 1</a></td>
<td width="8" bgcolor="#333366"><img name="RTab1" src="../images/tab_right_on.gif" width="8" height="19" alt="" border="0"></td>
<td width="1"><img src="spacer_trans.gif" width="1" height="1" alt="" class="decoration"></td>
<td width="8" bgcolor="#5389BC"><img name="LTab2" src="../images/tab_left_off.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab2" width="137" valign="middle" bgcolor="#5389BC" align="center" ><font color="white">»</font> <a onclick="return selectTab(2,4);" href="body_top.html" target="content" class="tablink">Form 2</a></td>
<td width="8" bgcolor="#5389BC"><img name="RTab2" src="../images/tab_right_off.gif" width="8" height="19" alt="" border="0"></td>
<td width="1"><img src="spacer_trans.gif" width="1" height="1" alt="" class="decoration"></td>
<td width="8" bgcolor="#5389BC"><img name="LTab3" src="../images/tab_left_off.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab3" width="135" valign="middle" bgcolor="#5389BC" align="center" ><font color="white">»</font> <a onclick="return selectTab(3,4);" href="footer_top.html" target="content" class="tablink">Form 3</a></td>
<td width="8" bgcolor="#5389BC"><img name="RTab3" src="../images/tab_right_off.gif" width="8" height="19" alt="" border="0"></td>
<td width="1"><img src="spacer_trans.gif" width="1" height="1" alt="" class="decoration"></td>
<td width="8" bgcolor="#5389BC"><img name="LTab4" src="../images/tab_left_off.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab4" width="137" valign="middle" bgcolor="#5389BC" align="center" ><font color="white">»</font> <a onclick="return selectTab(4,4);" href="validation_top.html" target="content" class="tablink">Form 4</a></td>
<td width="8" bgcolor="#5389BC"><img name="RTab4" src="../images/tab_right_off.gif" width="8" height="19" alt="" border="0"></td>
</tr>
<tr><td colspan="16" bgcolor="#333366"><img src="spacer_trans.gif" width="1" height="1"></td></tr>
</table>
<IFRAME name="content" scrolling="auto" frameborder="0" framespacing="0" border="0" width="625" src="form1.html" height="350" align="center">
</IFRAME>
<table align="center">
<tr>
<td align="right"><input type="submit" value="submit" > </td>
</tr>
</table>
</body>
</html>
(Credit goes to Dave for helping me build these tabs)
Thanks!
I have a page that contains 4 navigation tabs.Each tab loads a form into an iframe.So there are 4 individual html pages.
My questions are:
1. how can I perform a single submit for all these pages.
2. Also, When I tab thro' these tabs, I dont want to lose the values that have already been entered.
Here is how my page looks like:
<html>
<head>
<title> </title>
<script language="JavaScript" type="text/javascript">
<!--//
leftOn = "../images/tab_left_on.gif";
rightOn = "../images/tab_right_on.gif";
leftOff = "../images/tab_left_off.gif";
rightOff = "../images/tab_right_off.gif";
colorOn = "#333366";
colorOff = "#5389BC";
//
function selectTab(tab,cnt) {
for (var j=1; j<=cnt; j++) {
if (j==tab) {
document.images["LTab"+j].src = leftOn;
document.getElementById("Tab"+j).bgColor = colorOn;
document.images["RTab"+j].src = rightOn;
} else {
document.images["LTab"+j].src = leftOff;
document.getElementById("Tab"+j).bgColor = colorOff;
document.images["RTab"+j].src = rightOff;
}
}
return true;
}
//-->
</script>
</head>
<body leftmargin="0" topmargin="0" >
<br>
<table width="600" align="center">
<tr>
<td>Enter Definitions for each Tab :</td>
</tr>
</table>
<br>
<table border="0" cellpadding="0" align="center" cellspacing="0" width="600">
<tr valign="top">
<td width="8" bgcolor="#333366"><img name="LTab1" src="../images/tab_left_on.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab1" width="137" valign="middle" bgcolor="#333366" align="center"><a onclick="return selectTab(1,4);" href="header_top.html" target="content" class="tablink"><font color="white">»</font> Form 1</a></td>
<td width="8" bgcolor="#333366"><img name="RTab1" src="../images/tab_right_on.gif" width="8" height="19" alt="" border="0"></td>
<td width="1"><img src="spacer_trans.gif" width="1" height="1" alt="" class="decoration"></td>
<td width="8" bgcolor="#5389BC"><img name="LTab2" src="../images/tab_left_off.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab2" width="137" valign="middle" bgcolor="#5389BC" align="center" ><font color="white">»</font> <a onclick="return selectTab(2,4);" href="body_top.html" target="content" class="tablink">Form 2</a></td>
<td width="8" bgcolor="#5389BC"><img name="RTab2" src="../images/tab_right_off.gif" width="8" height="19" alt="" border="0"></td>
<td width="1"><img src="spacer_trans.gif" width="1" height="1" alt="" class="decoration"></td>
<td width="8" bgcolor="#5389BC"><img name="LTab3" src="../images/tab_left_off.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab3" width="135" valign="middle" bgcolor="#5389BC" align="center" ><font color="white">»</font> <a onclick="return selectTab(3,4);" href="footer_top.html" target="content" class="tablink">Form 3</a></td>
<td width="8" bgcolor="#5389BC"><img name="RTab3" src="../images/tab_right_off.gif" width="8" height="19" alt="" border="0"></td>
<td width="1"><img src="spacer_trans.gif" width="1" height="1" alt="" class="decoration"></td>
<td width="8" bgcolor="#5389BC"><img name="LTab4" src="../images/tab_left_off.gif" width="8" height="19" alt="" border="0"></td>
<td id="Tab4" width="137" valign="middle" bgcolor="#5389BC" align="center" ><font color="white">»</font> <a onclick="return selectTab(4,4);" href="validation_top.html" target="content" class="tablink">Form 4</a></td>
<td width="8" bgcolor="#5389BC"><img name="RTab4" src="../images/tab_right_off.gif" width="8" height="19" alt="" border="0"></td>
</tr>
<tr><td colspan="16" bgcolor="#333366"><img src="spacer_trans.gif" width="1" height="1"></td></tr>
</table>
<IFRAME name="content" scrolling="auto" frameborder="0" framespacing="0" border="0" width="625" src="form1.html" height="350" align="center">
</IFRAME>
<table align="center">
<tr>
<td align="right"><input type="submit" value="submit" > </td>
</tr>
</table>
</body>
</html>
(Credit goes to Dave for helping me build these tabs)
Thanks!