PC Review


Reply
Thread Tools Rate Thread

changing document.getElementById("X").innerHTML in IE versus firef

 
 
=?Utf-8?B?cGVhY2U0dGhlYXBlcw==?=
Guest
Posts: n/a
 
      29th Dec 2005
Hey guys,

I have a Coldfusion application where I am using AJAX and sending back some
string to the Javascript function. The javascript function writes that string
into the appropriate DIV element referenced by the id. This function works
fine in Firefox, but nothing shows up in IE though the string shows up the
Javascript side of the application.

The Javascript function used:

function loadcart(valmessage)
{
document.getElementById("cartcontents").innerHTML =
valmessage;
}

The Div Element:
<div id="cartcontents">
</div>

The valmessage (string passed into javascript) :

<tr><td>Ghost Sugar Cookie</td><td>4</td><td><a href='javascript:void(0);'
onclick='addone("374","add")'><img src='images/plus.gif' alt='Add another.'
width='16' height='16'></a><br><a href='javascript:void(0);'
onclick='addone("374","remove")'><img src='images/minus.gif' alt='Remove
one.' width='16' height='16'></a></td></tr><tr><td>Licorice
Mix</td><td>1</td><td><a href='javascript:void(0);'
onclick='addone("378","add")'><img src='images/plus.gif' alt='Add another.'
width='16' height='16'></a><br><a href='javascript:void(0);'
onclick='addone("378","remove")'><img src='images/minus.gif' alt='Remove
one.' width='16' height='16'></a></td></tr><tr><td>Halloween Barber
Pole</td><td>1</td><td><a href='javascript:void(0);'
onclick='addone("375","add")'><img src='images/plus.gif' alt='Add another.'
width='16' height='16'></a><br><a href='javascript:void(0);'
onclick='addone("375","remove")'><img src='images/minus.gif' alt='Remove
one.' width='16' height='16'></a></td></tr>


I don't understand the reason behind why it is happening. All the processes
are doing fine except for the last stage where the HTML element is being
updated. It would be great if someone could provide an insight into this.

Thanks,
Prashant
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
document.getElementById("ReportViewerID") returns null =?Utf-8?B?QmlsbHk=?= Microsoft ASP .NET 6 7th Jul 2006 07:22 PM
"Unknown runtime error" when DIV.innerHTML includes FORM tag =?Utf-8?B?TWF0dA==?= Windows XP Internet Explorer 0 16th May 2006 07:15 PM
"getelementbyid" getting error in server 2000 instalation =?Utf-8?B?TmV3IGd1eS4uIHBsZWFzZSBoZWxw?= Microsoft Dot NET 2 10th Mar 2006 11:11 PM
datalist, js function, printing - is innerhtml ignoring <div class="x"> read from SQL db yer darn tootin Microsoft ASP .NET 2 8th Jun 2005 06:53 PM
Changing the directory of "My Document" and "Program Files". Nimo Windows XP Basics 3 15th Sep 2003 03:11 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:51 AM.