Hmmmm I don't know.  Not an expert in JS but I have a line such as this in
an application and it works fine:
Win 2000,98 IE 5.5

cell_4.childNodes[0].onfocus = new
Function("test(document.forms['Order']'Price"+key+"'],'"+key+"');");

I did notice I used double quotes but that shouldn't matter, and there is a
missing ; this would probably matter.

so it may need to look like
newCell.onMouseOver = new function("doThis();");

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA


-----Original Message-----
From: John McCosker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2003 11:28 AM
To: CF-Talk
Subject: RE: js question


//newCell.onMouseOver = new function('doThis()');

I get an 'Expected Identifier' error when trying that Ian,
Win XP, IE 6.

-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: 10 September 2003 19:19
To: CF-Talk
Subject: RE: js question


try this
newCell.onMouseMove= new function('doThis()')

HTH

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA


-----Original Message-----
From: John McCosker [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 10, 2003 11:10 AM
To: CF-Talk
Subject: js question


Hi,

I You can dynamically create <tr> and <td> elements on the fly,
like,

var newRow=cell_root_table.insertRow(0)

then add attributes like,

newRow.vAlign='top'

then to add a cell,

var newCell=newRow.insertCell(0)

but I can't seem to add event handlers on the fly,
like newCell.onMouseMove='doThis()',

Is there a way to do this?

J



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to