Problem with IE
Problem with IE
Hello,
I have found an example for editing a datatable here. Today I found a problem with IE.
In the datatable in the edit mode there is an <select> element. (sel_swsolutionedit)
function editRow ( oTable, nRow )
{
var aData = oTable.fnGetData(nRow);
var jqTds = $('>td', nRow);
var swsolutionlistbegin = '<select name="sel_swsolutionedit" id="sel_swsolutionedit" class="mediuminput">';
<?php
$swsolutionlist = get_SwSolutionList();
$swsolution_values = "";
if(!empty($swsolutionlist)){
foreach($swsolutionlist as $sqldata){
$swsolution_values.= "<option value=\"{$sqldata['swsolutionid']}\">{$sqldata['description']}";
}//foreach
}//if not empty
?>
var swsolutionvalues = '<?php echo $swsolution_values;?>';
var swsolutionlistend = '</select>';
var swsolutioncomplete = swsolutionlistbegin + swsolutionvalues + swsolutionlistend;
..
jqTds[1].innerHTML = swsolutioncomplete;
...
If you change the <select> value or option and click on Save, the IE does not recognice this value. Firefox and Chrome works fine.
function saveRow ( oTable, nRow )
{
var jqInputs = $('input', nRow);
var jqSelects = $('select', nRow);
var solution = jqSelects[0].value;
alert('die solution ist ' + solution);
This alert is empty in IE. Has InternetExplorer Problems with jqSelects[0].value ?
Has somebody an idea why this happens with IE?
Answers
Has nobody an idea why this "jqSelects[0].value" is not working with <select> elements?