July 10, 2000

Using setAttribute Method of DOM Object in VB

Question: I am unable to use “setAttribute” method in Visual Basic. Following is the piece of code. Dim objXML As DOMDocumentDim objOrders As IXMLDOMNodeDim objOrder As IXMLDOMNodeSet objXML = CreateObject(“Microsoft.XMLDOM”)Set objOrders = objXML.createElement(“Orders”)objXML.appendChild objOrdersSet objOrder = objXML.createElement(“Order”)objOrders.appendChild objOrderobjOrder.setAttribute “OrderID”, rsOrderHeaders(“OrderID”) Please let me know where I am going wrong. Is

Add vs String Concatenate

Question: I want to force the addition of two numbers in JavaScript, but they always just concatenate. There has to be a simple way to do this that I’m missing. Can you help me out? Answer: You can force a string (which is what JavaScript thinks your numbers are) to

Filtering On Node Name

Question: I have an XML document for news items. It has a tag which has 3 child nodes , and , of which there can be multiples with the one tag.For example: What I want to be able to do is branch to a given template, depending on the name

Determining a Client’s Time Zone

Question: I want to know from which time zone a client is accessing my site to control display of commercial ads. How can I find this out? Answer: In general, these are the steps to determine a client’s time zone: Use JavaScript on the client to determine the time on

Don’t use VB Registry functions in WebClasses and ASP components

Here’s a scenario that might be familiar to you: You create a WebClass or a regular COM component that will be invoked from within an ASP applicationThe application uses VB’s built-in registry functions, such as DeleteSetting, SaveSetting, GetSetting, or GetAllSettings Everything works when you debug the application inside the IDEHowever,