i have a page with tabs, the tabs are done in html pages and no images are used.
here is the code what i am doing :
[HTML]<table border="0" cellpadding="0" cellspacing="0" width="42%" id="table3">
<br>
<tr> <!-- #014F96 -->
<script>alert(document.write('bag'));</script>
<td align="center" bgcolor="document.write(bag)"width="25%"><b><font face="Verdana">
<a class="lnk" href="javascript: shInstructions(1);">
<font color="#FFFFFF" size="2">Qualification</font></a></font></b></td>
<td align="center" width="1%"> </td>
<td align="center" style="border: 1px solid #014F96; padding: 0" width="25%">
<font face="Verdana" size="2">
<a href="javascript: shInstructions(2);">Experience</a></font></td>
<td align="center" width="1%"> </td>
<td align="center" width="30%" style="border: 1px solid #014F96; padding: 0">
<font face="Verdana" size="2">
<a href="javascript: shInstructions(3);">Family Details</a></font></td>
</tr>
</table>
[/HTML]
i am calling a function shinstruction which does hiding of tables below.
now when a user clicks the next tab the bg color has to change and the tab from where he moves has to come to the original color.
How do i do this ?? Using javascript.
I checked with document .write(bg) --> this was a variable that i was passing from the javascript below :
Expand|Select|Wrap|Line Numbers
- <script language="javascript">
- function shInstructions(gg)
- {
- if (gg==1)
- {
- if (window.qual.style.display == "none")
- window.qual.style.display = ""
- else
- window.qual.style.display = ""
- window.exp.style.display = "none"
- window.family.style.display = "none"
- var bag="white"
- }
- if (gg==2)
- {
- if (window.exp.style.display == "")
- window.exp.style.display = ""
- else
- window.qual.style.display = "none"
- window.exp.style.display = ""
- window.family.style.display = "none"
- }
- if (gg==3)
- {
- if (window.family.style.display == "")
- window.family.style.display = ""
- else
- window.qual.style.display = "none"
- window.exp.style.display = "none"
- window.family.style.display = ""
- }
- }
- </script>