WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 DHTML/DOM - setAttributes onfocus and onchange, Wendi, February 5, 2004
     Re:DHTML/DOM - setAttributes onfocus and onchange, Erik Arvidsson, February 5, 2004
         Re:DHTML/DOM - setAttributes onfocus and onchange, elijah, August 4, 2004

Subject: DHTML/DOM - setAttributes onfocus and onchange From: Wendi Date: February 5, 2004
ISSUE:  Setting Attributes in a Dyanmically Drawn Input type="text"

I am dynamically altering a couple rows in a table based on a user selection.  Based
on the users selection in a select element, rows in a <table><tbody></tbody><table>
are removed or added.

When i add back the table rows i use:
// create the row
oRow = oTable.insertRow();

// create the cell
oCell = oRow.insertCell();

// create the input type="text"
oInput = document.createElement("INPUT");
oInput.setAttribute('onfocus', "if(this.value=='0.00')this.value='';");
oInput.setAttribute('onchange', "genericfunction();");

MY PROBLEM: When i trigger the "on focus" or "on change" events
from the dynamic input form, NO EVENT IS FIRED.  HELP!!!???  I can tell onfocus
and onchange attributes ARE set in the nodeName/nodeType of the attribute array
where nodeName = onfocus and/or onchange.  I can see them if i iterate thru
the oNode.attributes[] for the input form.  ANYONE... any suggestion would be appreciated.

I am using IE 6+.



Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.

View All Messages
Back to WebFX