wkenny
07-18-2005, 08:51 PM
Please, please help befor I go completely mental.
What is wrong with this script. When I run it as pasted here it shows the table in the browser. But if I uncomment a second line in the first part of the 'If' clause I get a blank screen. It does not matter which line in the first part is umcommented as long as there is only one 'active' line. Since the 'else' bit always displays the table, I cut and pasted the write clauses from here into the
'if' part and still get the problem.
<table>
<tr>
<script language="JavaScript">
var path = window.location.href;
if (path.indexOf("build")!=-1)
document.write('<th class="h1" align="left">buso</th>');
//document.write('<th class="h2">Tel (+34)</th>');
//document.write('<th class="h3">Languages</th>');
//document.write('<th class="h4" align="left">S R C F</th>');
//document.write('<th class="h5">Email</th>');
//document.write('<th class="h6">Web</th>');
else
document.write('<th class="h1" align="left">buso</th>');
document.write('<th class="h2">Tel (+34)</th>');
document.write('<th class="h3">Languages</th>');
document.write('<th class="h4" align="left">S R C F</th>');
document.write('<th class="h5">Email</th>');
document.write('<th class="h6">Web</th>');
</script>
</tr>
</table>
I just cannot figure it out. Thanks in advance for keeping me sane.
Billy
What is wrong with this script. When I run it as pasted here it shows the table in the browser. But if I uncomment a second line in the first part of the 'If' clause I get a blank screen. It does not matter which line in the first part is umcommented as long as there is only one 'active' line. Since the 'else' bit always displays the table, I cut and pasted the write clauses from here into the
'if' part and still get the problem.
<table>
<tr>
<script language="JavaScript">
var path = window.location.href;
if (path.indexOf("build")!=-1)
document.write('<th class="h1" align="left">buso</th>');
//document.write('<th class="h2">Tel (+34)</th>');
//document.write('<th class="h3">Languages</th>');
//document.write('<th class="h4" align="left">S R C F</th>');
//document.write('<th class="h5">Email</th>');
//document.write('<th class="h6">Web</th>');
else
document.write('<th class="h1" align="left">buso</th>');
document.write('<th class="h2">Tel (+34)</th>');
document.write('<th class="h3">Languages</th>');
document.write('<th class="h4" align="left">S R C F</th>');
document.write('<th class="h5">Email</th>');
document.write('<th class="h6">Web</th>');
</script>
</tr>
</table>
I just cannot figure it out. Thanks in advance for keeping me sane.
Billy