Updating a childNode.text value

Posted on 2005-03-11
Medium Priority
Last Modified: 2008-02-01
The code below is nearly is fine exept for the bit in between '::::::' have a look below for more info:

What I want to do is update this node value to the current date and time sounds easy.....


above is ok its the bit below that causes the problem, I dont even know if it is right!!!

Error message is: 800a01a8|Object_required:_'0'


userkeepuseraliveobjchildNodes[0].text = now()


and then save the file which I have.

p.s. using MSXML 4.0 and asp for the script.

Question by:scanet
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

guru_k earned 500 total points
ID: 13523720

first, there is a simple syntax error, you forgot the DOT before childNodes:

userkeepuseraliveobj.childNodes[0].text = now()

Since I am not familiar with ASP I just can give you some generic DOM specification know how. The DOM specification, Node interface, says that the property nodeValue should be used.

So in theory, like this:

userkeepuseraliveobj.childNodes[0].nodeValue = now()

Additionally the DOM specification for CharacterData says:

userkeepuseraliveobj.childNodes[0].data = now()

One of those should work.


Author Comment

ID: 13523755
Thanks, Im always doing sillys.

Featured Post

Congratulations! You’re Certified – Now What?

Starting a new career can be overwhelming. Becoming certified in your field of expertise is a great start, but where do you go from here?  Here are some tips to help you on your career journey.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question