mkpdev@gmail.com wrote:[color=blue][color=green]
>> Adonis wrote:
>> The code provided works as it should on IE, but not in FF.
>> I have tried most of what I can think of, being new to JavaScript.
>>
>> I have tried createElement/createTextNode/appendChild lingo, also
>> document.write(...) and all work for IE, but not FF, something I am[/color][/color]
missing?[color=blue][color=green]
>>
>> Any help is greatly appreciated.
>>
>> Adonis
>>
>> [snip]
>>
>> <body>
>> <div id="patient">
>> <script type="text/javascript">
>> getURL('GET', '/patient/list', getPatientList);
>> var divPatient = document.getElementById("patient");
>> for (var i = 0; i < patientList.length; i++)
>> divPatient.innerHTML = divPatient.innerHTML + patientList[i] +[/color][/color]
"<br[color=blue][color=green]
>> />";
>> </script>
>> </div>
>> </body>[/color][/color]
[color=blue]
> Firefox comes with a nice little JavaScript console (&Tools:[/color]
JavaScript[color=blue]
> &Console). Chances are you have an error with your getURL function.
> (You might consider learning about the += operator.)[/color]
....or the Array.join() method... #;=)
document.write(patientList.join('<br>'));