Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Element values and IE #3

Open
group131 opened this issue Jun 7, 2012 · 4 comments
Open

Element values and IE #3

group131 opened this issue Jun 7, 2012 · 4 comments

Comments

@group131
Copy link

group131 commented Jun 7, 2012

Element values (text) are not displayed in IE (6/7/8). They are in IE9, which supports textContent...
Using something like the following snippet solves the problem:

function _getNodeValue(node){
var $textNodes = _getTextNodes(node);
var textValue = "";
if (node && _isCommentNode(node)) {
textValue = node.nodeValue;
} else if($textNodes[0]) {
//Extra if added to fix IE6/7/8 bug that did not show any element values...
if ($textNodes[0].textContent) {
textValue = $.trim($textNodes[0].textContent);
} else {
//IE6/7/8 case
textValue = $.trim($textNodes[0].text);
}
}
return textValue;
}

@subchild
Copy link
Owner

subchild commented Jun 8, 2012

Thanks. Wanna submit a pull request?

@group131 group131 closed this as completed Jun 8, 2012
@group131
Copy link
Author

group131 commented Jun 8, 2012

I would if I knew how. I'm a github noob and it's not like I can use a SVN client to commit code...
Anyway, I'm working on several extensions (making the whole tree xsd aware etc.). If things work out, I guess I could read some documentation on how to commit my code...

P.S. Great work btw...

@group131 group131 reopened this Jun 8, 2012
@subchild
Copy link
Owner

subchild commented Jun 8, 2012

No worries; I'll incorporate soon. Cheers.

@group131
Copy link
Author

Same problem exists in setNodeValue too...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants