Works in Firefox & Opera, but not IE 8
- by Ai Pragma
1) This issue involves just one html webpage, lets call it "ajax.html".2) I have AJAX functions in this webpage that work in both Firefox and IE8.3) I now attempt generating just the option values of a dropdown list of dates using my ajax functions, and it works in Firefox & Opera, but not IE8.4) The surrounding html code for the dropdown looks like this:<select name="entry_7_single" id="entry_7" onChange="Ajax_PhpResultsWithVar('./secure/db/SummaryCls.php','entry_8','dateval',this.value)"></select>The onchange call refers to an ajax function that successfully(both Firefox & IE8) populates a textarea(entry_8) with a description of an event associated with the date selected in this dropdown. 5) An onload call initiates the ajax function to generate the dropdown list values:<body class="ss-base-body" onLoad="OnLoadWebPage()">6) The js script that calls the ajax function is as follows:function OnLoadWebPage(){ Ajax_PhpResults('./secure/db/GenDateListCls.php','entry_7');}7) Since it works in Firefox, but not IE8, I throw the output of the ajax function into a Firefox large textbox and I get the following:<option selected value="8 JUN 2010">8 JUN 2010</option> <option value="9 JUN 2010">9 JUN 2010</option> <option value="10 JUN 2010">10 JUN 2010</option> <option value="11 JUN 2010">11 JUN 2010</option> 8 ) There are over a hundred generated but you get the gist of what the ajax function generates. Next I will list the PHP function that outputs the above dropdown values://///////////////////////////////////////////////////////////////////////////////////////////////////////<?phpinclude_once 'SPSQLite.class.php';include_once 'misc_funcs.php';class GenDateListCls { var $dbName; var $sqlite; function GenDateListCls() { $this->dbName = 'accrsc.db'; $this->ConstructEventDates(); } function ConstructEventDates() { $this->sqlite = new SPSQLite($this->dbName); $todayarr = getdate(); $today = $todayarr[mday] . " " . substr($todayarr[month],0,3) . " " . $todayarr[year]; $ICalDate = ChangeToICalDate($today); $dateQuery = "SELECT dtstart from events where substr(dtstart,1,8) >= '" . $ICalDate . "';"; $this->sqlite->query($dateQuery); $datesResult = $this->sqlite->returnRows(); foreach (array_reverse($datesResult) as $indx => $row) { $normDate = NormalizeICalDate(substr($row[dtstart],0,8)); if ($indx==0) { ?> <option selected value=<?php echo('"' . $normDate . '"'); ?>><?php echo $normDate; ?></option><?php } else {?> <option value=<?php echo('"' . $normDate . '"'); ?>><?php echo $normDate; ?></option><?php } } $this->sqlite->close(); }}$dateList = new GenDateListCls(); ?>/////////////////////////////////////////////////////////////////////////////////////////////////////////////<<< I appreciate any assistance on this matter. Aipragma >>>
My Background:
To let you all know, I am a complete newbie to PHP, Ajax, & javascript, and learning it all on my own, no classes. My background is in Linux, Windows, C++, Java, VB,VBA,MS XML, & some html.