Jump to content

split a nodeValue


hamburgerlove413

Recommended Posts

Hello,

 I'm getting an XML tag node value using var dropOption = document.createTextNode(title[0].firstChild.nodeValue); and after I want to be able to split that certain places like you can with a string using split. Is this possible? I tried using split on dropOption after I get the value but it doesn't work. Maybe I'm doing something wrong though, because wouldn't the nodeValue become a string after it's assigned to the variable?

 

Edit: nevermind, I've got it figured out, i needed to assign the nodeValue to a variable before using that to create the text node, this post can be deleted.

Link to comment
https://forums.phpfreaks.com/topic/286230-split-a-nodevalue/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.