The Latest

DevX - Software Development Resource

Dynamic Content Using Radio Buttons

Question: I wrote JavaScript code that displays different text depending on the radio button clicked. I used innerHTML to display text, which works fine on Internet Explorer 5 but not

DevX - Software Development Resource

Write Text Files to the Client

Question: I’m trying to figure out a way to pass along a questionnaire built in HTML so that users can fill it out in their browser, then have the answers

DevX - Software Development Resource

Scripting an Auto Reply

Question: How do I write a script so that every time a particular mailbox receives a new message, that mailbox generates an automatic standard reply? Answer: It’s fairly easy to

DevX - Software Development Resource

Scrollbar Value Notification

Question: Is there a way that I can dynamically determine the value of aScrollbar when I am scrolling? The adjustmentValueChanged method gets called only when you stop scrolling. But I

DevX - Software Development Resource

Serialization to Byte Array

Question: How can I convert a class instance to a byte array and thensubsequently reconstruct the original class from the byte array? Answer: Java’s Object Serialization API allows you to

DevX - Software Development Resource

Call a DLL From ASP

Question: I have a DLL called math911.dll and a function called a101. Private objM As MATH911.questionsSet objM = New MATH911.questions’use the functionCall objM.a101(level, TOPlevel, tipe, problem, ans, cpt, INSTRUCTIONS, AMT,

DevX - Software Development Resource

Append a NodeList to a Node

Question: Is it possible to append all the elements of a nodelist to a node as children without using a for loop? I want to overcome the performance problems incurred

DevX - Software Development Resource

Object Finalization

Question: How can I finalize an object without waiting for the garbage collector? Answer: The System class contains a convenience method called gc() that canbe used to ask the JVM

DevX - Software Development Resource

Expose Multiuse Classes in ActiveX Control Projects

A lesser-known, new feature in VB6 is the ability to have MultiUse and GlobalMultiUse classes within an ActiveX control project. This is useful if you have ActiveX controls and creatable

DevX - Software Development Resource

The Month of Calendar Class

For some reason unknown to me, the designers of java.util.Calendar class have enumerated months of the year from 0 to 11 inclusive. So, January would be month zero, and December

DevX - Software Development Resource

Using Applet Viewer the Easy way

To test your applets using the applet viewer, put the following comment in your Java file: /* */ Then you won’t need an HTML file for your applet code. The

DevX - Software Development Resource

Share Script Functions

In ASP pages, you can share script functions or libraries using the #INCLUDEdirective. This feature allows you to share subroutines and functions acrossmultiple pages. Instead of repeating similar (or rather

DevX - Software Development Resource

Enumerate Treeview Nodes Recursively

Trying to parse a set of TreeView nodes and their children’s nodes and their children’s nodes can be confusing. This algorithm makes the process easier. Recursion describes an algorithm that

DevX - Software Development Resource

Representation of Floating Point Numbers

People sometimes complain about the inaccuracy of floating point arithmetic. To demonstrate the level of floating pint inaccuracy, consider the following program: #include using namespace std; int main() { float

DevX - Software Development Resource

Deleting Duplicate Rows

Question: I have this table: declare tbl1 (x int,y int,z int); I don’t have a column I could use as a unique key. There are some duplicate rows (not just

DevX - Software Development Resource

Client-Side Data Binding Is IE-Only

Question: Designing with JavaScript by Nick Heinle talks about using Internet Explorer’s Object tags for simple data binding of CDV databases. Is there a Netscape Embed tag (or other equivalent)

DevX - Software Development Resource

Replace Selected Content

Question: How do I replicate the pasteHTML function supported by Internet Explorer in Netscape? Rewriting the layer isn’t the problem. The problem is determining the position of the text returned

DevX - Software Development Resource

Integration of Replication and DTS Steps

Question: I am trying to build a warehouse. The steps involved are: Make a snapshot replication of the OLTP onto the staging area. Run a DTS package that makes transformations

DevX - Software Development Resource

Access CGI Environment Variables

Question: Can JavaScript access CGI environment variables? Once a user has logged into my site, I would like to retrieve the user name from the “REMOTE_USER” variable. Answer: No, there

DevX - Software Development Resource

JSP Methods

Question: Is there a way to declare and invoke methods in JavaServer Pages? Answer: Methods can be declared in the same way as variables in JavaServerPages. It can help to

DevX - Software Development Resource

Caching JavaScript Code

Question: Is it possible to cache a JavaScript or remote .JS file on a client? It seems that while you can cache images, HTML, objects, and so on, caching .JS

DevX - Software Development Resource

Default Date Format

Question: I have an issue with date formats. I have a VB client piece of software that generates a select based on a particular date. However it only works on

DevX - Software Development Resource

Limiting SELECT Results to Only a Few Rows

Question: How do I limit an SQL SELECT statement to returning just the top ten producing offices? Answer: Use the TOP operator or SET ROWCOUNT to 10. Related Posts UK

DevX - Software Development Resource

Add a Custom Favorites Icon

Question: When I add sites to my Microsoft Internet Explorer Favorites, the site’s logo (or icon) appears by the Web page’s name instead of the little “e” that usually appears