My issue may be similar to daved83's issue where my script works as designed in firefox but when used in IE6 (the only IE i have tried so far but matters because it will only be used on IE6 at this stage)
his was in AJAX and I am new to JavaScript and didnt understand his code that well.
The dynamic dropdown is supposed to come under the already populated table but in IE6 it removes the table and only populates the dynamic content.
here is my code
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript">
// <![CDATA[
function generate()
{
var sms = ''
var impact = document.sms.impacted.value;
var status = document.sms.status.value;
var action = document.sms.action.value;
var BR = '\n';
sms = sms + '<table name="table2" width="500" border="0" align="center">';
sms = sms + '<tr><td>';
sms = sms + '<textarea name="template" rows="10" cols="55">';
sms = sms + 'Service Impacted: '+ impact + BR;
sms = sms + 'Service Status : '+ status + BR;
sms = sms + 'Next Action : '+ action + BR;
sms = sms + '</textarea>';
sms = sms + '</td></tr></table>';
document.getElementById('sms').innerHTML=sms;
//document.getElementById('blank').innerHTML='';
}
function noComms()
{
var service = document.sms.impacted.value;
var istatus = 'Loss of '+service+' to site';
var status = document.sms.status.value;
status = istatus;
}
// ]]>
</script>
<link href="scripts/imt.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script type="text/javascript">
<!--
-->
</script>
<div id="page">
<div id="wrapper">
<div id="header"></div>
<div id="topSpacer"></div>
<div id="body">
<h2 align="center">The Fault logging assistant</h2>
<h3 align="center"></h3>
<form name="sms" action="">
<table name="table" width="500" border="0" align="center">
<tr align="center">
<td colspan="2">
<h3>SMS Template Generator</h3>
</td>
</tr>
<tr>
<td><strong>Service Impacted: </strong></td>
<td>
<select name="impacted">
<option value="">-- Please Select --</option>
<option value="data">Data</option>
<option value="voice">Voice</option>
</select>
</td>
</tr>
<tr>
<td><strong>Service Status: </strong></td>
<td>
<input type="text" name="status" value="">
</td>
</tr>
<tr>
<td></td>
<!-- <td><input type="radio" name="noComms" onchange="noComms()">Click for loss of comms to site!</td> -->
</tr>
<tr>
<td><strong>Next Action: </strong></td>
<td>
<input type="text" name="action" value="">
</td>
</tr>
<td><input type="button" name="button" value="Generate" onClick="generate()">
<tr>
</tr>
<tr>
<td colspan="2">
<br/>
<br />
</td>
</tr>
</table>
</form>
</div>
<div id="body">
<span id="sms"></span>
</div>
<div id="bottomSpacer"></div>
<div id="footer">
SMS Template Generator V-1.0 Designed By xxxx xxxxxx. 2009
</div>
</div>
</div>
</body>
</html>
Is there a way to fix this for IE6?