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.

Edited by hamburgerlove413
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.