Browse DevX
Sign up for e-mail newsletters from DevX

Search the Tips


1-20 of 21     Previous     Next
Adding Custom Attributes to HTML Elements
by Deepak Choudhari
A custom attribute is any user-defined attribute, just like other primitive HTML element attributes. You can add custom attributes to any HTML element.
How to Warn Users Before Their Browser Closes
by Deepak Choudhari
Suppose a user enters some information on the page and tries to close or navigate from the window—without saving the data. You may want to warn the user about possible data loss.
Invoke a Parent Window Function from Another Window in JavaScript
by Deepak Choudhari
Sometimes, you need to call a JavaScript function that's in a parent window from a child window.
Using the innerHTML Property
by Ganjoo Anu
To change the text that appears when users chick on a button in your program, use JavaScript's innerHtml property.
Use LSOutput and LSSerializer to Serialize a DOM Tree
by Leonard Anghel
This tip shows you how to use the LSOutput/LSSerializer interfaces (from the DOM Load and Save API) for serialize a DOM tree.
Apply an Identical Transformation to a DOM Tree Using TrAX
by Leonard Anghel
The code in this tip is a full example that applies an identical transformation to a DOM tree.
Javascript Errors in Firefox
by Balasubramanian Krishnaswamy
Because browsers other than IE don't create global variables for every part of the page/DOM, you need to qualify references to the form and its elements in non-IE browsers.
Using XMLSchema DOM and SAX in JAXP 1.2
by Leonard Anghel
To use take advantage of the power of XMLSchema in a SAX or DOM application, you simply have to set two properties.
Traverse All the Nodes of a DOM Tree
by Leonard Anghel
This is just a litle method that illustrates how to get the minimum of information from all nodes of a DOM tree. The key of this method is the "old-school" recursive style.
Using setAttribute Method of DOM Object in VB
by DevX Pro
I am unable to use "setAttribute" method in Visual Basic. Following is the piece of code. Dim objXML As DOMDocument Dim objOrders As IXMLDOMNode Dim objOrder As IXMLDOMNode Set objXML = CreateObject("Microsoft.XMLDOM") Set objOrders = objXML.createElement("Orders") objXML.appendChild objOrders Set objOrder = objXML.createElement("Order") objOrders.appendChild objOrder objOrder.setAttribute "OrderID", rsOrderHeaders("OrderID") Please let me know where I am going wrong. Is there any other way to set the attribute for a node?
Setting/Resetting Checkboxes with a Single Click
by Olivier Georg
I have a bunch of files on the server that I wanted to be able to select, for example, to delete them or to give them special treatment. Thus, I made a table with their names and a checkbox for ...
Save and Load
by DevX Pro
Is there any way to do a incremental save using XMLDOMDocument (MSXML parser) and also loading part of the Document tree?
Use XMLHttpRequest Object for Communication With HTTP Servers
by Deepak Pant
The XMLHttpRequest object provides client-side protocol support for communication with HTTP servers. A client computer can use the XMLHttpRequest object (Microsoft.XMLHTTP) to send an HTTP request, ...
Simplify DHTML Scripting With SrcElement
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Test Both Strings and DOM
by Kurt Cagle
Browsers Targeted: Internet Explorer ...
Insert XML Into Another XML Document
by DevX Pro
Is there an easy and efficient way to insert an XML document into another XML template? The insertion point can be before, between, or after specified nodes.
Using the History Object to Go to Specific Pages
by DevX Pro
I am using history objects back(1) ( history.back(1) )method in my HTML application to go to previous screen and it is working alright but I am not able to go back to a second previous screen . I have tried history.back(2), history.back(3), and so forth but it is not working.
Use a Data Stream as a Source for DOMDocument
by DevX Pro
Instead of using: oXML.Load "c:\program files\xml notepad\Appntmts.xml" I want to do something like: oXML.Load Command() where the Visual Basic Command function returns an XML formatted data stream passed on the command line. In the previous example, the Load accepts the string without complaint, but none of the document properties return anything valuable. It seems to be treating the data stream as a URL.
Text Range and pasteHTML
by DevX Pro
I am using an array on the client side to create an HTML string that builds a table of data, which the user can then manipulate. Because the array is on the client side and the user can insert, delete, and change data, I'm using a text range on the body and pasteHTML to render the table to the user. The table and data appear but none of the events tied to the elements are firing. These events are included in the HTML string. I've tried encoding quotes (chr(34)) which ended up making a set of double quotes, no quotes, and a single quote. None of these seem to have any effect. What is odd is that I can do a document.write so that I can see the rendered HTML, copy this to a new page, add in the subs, and the events fire. I've searched everywhere and can't find any topics that would indicate what my problem could be.
What's Beyond Browser Detection
by Erik Goetze
Ever since browsers started multiplying, Web designers have wanted to take advantage of new capabilities without breaking the page for users of older browsers. To use image rollover effects safely, ...
1-20 of 21     Previous     Next
Thanks for your registration, follow us on our social networks to keep up-to-date