473,320 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Question about innerHTML

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 missing?

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] + "<br
/>";
</script>
</div>
</body>
Jul 23 '05 #1
2 1182
Firefox comes with a nice little JavaScript console (&Tools: JavaScript
&Console). Chances are you have an error with your getURL function.
(You might consider learning about the += operator.)

Jul 23 '05 #2
mk****@gmail.com wrote:
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 missing?
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] + "<br />";
</script>
</div>
</body>
Firefox comes with a nice little JavaScript console (&Tools: JavaScript &Console). Chances are you have an error with your getURL function.
(You might consider learning about the += operator.)


....or the Array.join() method... #;=)

document.write(patientList.join('<br>'));

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: DKM | last post by:
I have an empty tag like <p id="pid"></p> in a xml file. And, I have a script as foolows: str = "<b>Hello World!!!</b>"; ele = documeny.getElementById("pid");...
1
by: Joseph Barron | last post by:
Here is a SIMPLE problem that I'm trying to solve. It works in Netscape 6.2, but IE6 gives ""No such interface supported." Below are page1.htm and page2.htm . In page1.htm, there are two...
7
by: Yaqian Fang | last post by:
Hi, could anyone please tell me how to make a button look like "being clicked"? A button picture always looks static, though a link is associated with it. Thank you.
9
by: LNM | last post by:
I am trying to create a survey type form where multiple choice answers are selected (radios) and I am using an onclick event to update a text box with 'correct', etc. I am using the...
6
by: Jon Davis | last post by:
I recently learned how to do an <OBJECT> alternative to <IFRAME> in current browsers using: <object id="extendedhtml" type="text/html" data="otherpage.html" width="250" height="400"></object> ...
10
by: Geoff Cox | last post by:
Hello, Would appreciate a little help here! How do I refer to multiple elements with IDs such as question1, question2, question3 etc, in following? ...
7
by: e | last post by:
I've been having an extremely difficult time finding an answer to this in IE / js groups, so I thought I'd try here. I've got an aspx page that delivers loads of report data into custom-named...
29
by: Knut Olsen-Solberg | last post by:
I try to change the text in a <p> using getElementById(). I wonder what properties exists, and which one to use here. (The following does not work.) Regards Knut ______________________ ...
9
by: martymix | last post by:
simple question: I have a simple <dt>test text</dt> I get the innerHTML of that dt, and I try and append some text to it like so: dt = document.getElementsByTagName('dt') var text =...
3
by: Tarik Monem | last post by:
You guys have been very helpful. Even if the solution was not presented in the reply, then you would at least spark a thought which would lead to the solution and I am very grateful for your...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.