Your bracketing looks fine.
Don't you have to do some kind of Active-X thingamabob for IE's xmlHttp
implementation, or do you have that in another part of the code?
Also, did you console.log the final url content to make sure it's what
you're expecting?
Finally, I don't think it's strictly required that you have a semicolon
after the below line of code but I'd put one there anyway, just to make sure
that's not the problem.
xmlHttp.onreadystatechange=
function()
{
document.getElementById("character").innerHTML=xmlHttp.responseText;
}; <== semicolon there
----- Original Message -----
From: "Phillip M. Vector" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Monday, July 28, 2008 4:35 PM
Subject: Re: Unknown JS error when doing AJAX.
> No. I didn't post the whole code. Trying to cut down on extra code..
>
> function updatestats()
> {
> xmlHttp=GetXmlHttpObject();
> <cfoutput>
> var url="#myself#AJAX.ShowCharacter";
> url=url+"&House="+document.getElementById("House").value;
> url=url+"&Genre="+document.getElementById("Genre").value;
> <cfset
> Traits="Strength,Fury,Agility,Sleight,Willpower,Intelligence,Perception,Wits,Manipulation,Charisma,Appearance,JenaSeQua,Life,Luck">
> <cfloop index="Trait" list="#Traits#" delimiters=",">
> url=url+"&#trait#="+document.getElementById("#trait#").value;
> </cfloop>
> </cfoutput>
>
> xmlHttp.open("GET",url,true);
> xmlHttp.send(null);
> xmlHttp.onreadystatechange=
> function()
> {
> document.getElementById("character").innerHTML=xmlHttp.responseText;
> }
> }
>
> I tried changing it to
> xmlHttp.onreadystatechange=
> function()
> {
> document.getElementById("character").innerHTML=xmlHttp.responseText};
> }
>
> But that didn't seem to help.
>
>
> Josh Nathanson wrote:
>
>> I don't know if you posted the entire code there, but if so, the second
>> close curly bracket should be a semicolon.
>>
>> xmlHttp.onreadystatechange=
>> function()
>> {
>> document.getElementById("character").innerHTML=xmlHttp.responseText;
>> }
>> } <== make that a semicolon
>>
>> -- Josh
>>
>>
>> ----- Original Message -----
>> From: "Phillip M. Vector" <[EMAIL PROTECTED]>
>> To: "CF-Talk" <[email protected]>
>> Sent: Monday, July 28, 2008 3:32 PM
>> Subject: Unknown JS error when doing AJAX.
>>
>>
>>> I'm setting up a AJAX JS which updates a field on the form that is
>>> called "character" as <div id="character">Stuff</div>
>>>
>>> When this function is run, it submits ok, but I get an "Unknown runtime
>>> Error" in the area of "{document.". The thing is, I thought Firefox was
>>> more solid on JS and it runs perfectly on that. But I do it in IE and it
>>> bombs.
>>>
>>> Any ideas what I'm missing?
>>>
>>> xmlHttp.onreadystatechange=
>>> function()
>>> {
>>> document.getElementById("character").innerHTML=xmlHttp.responseText;
>>> }
>>> }
>>>
>>>
>>
>>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309839
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4