Sponsored Content
Full Discussion: Tooltip Question
Top Forums Web Development Tooltip Question Post 302234813 by i9300 on Wednesday 10th of September 2008 11:37:58 AM
Old 09-10-2008
Answer

In case anyone finds this useful
Here is the code that I needed.......

Place text files report_file.txt and report_file2.txt are in the same dir as html -- or path them out in the code....

Code:
<html>
   <head>
      <title>System Reporting</title>
      <script type="text/javascript">
         function showBox(file_name, id, obj) {
            var helpNode = document.createElement('div'+id);
            helpNode.id = 'popBox'+id;
            helpNode.setAttribute('class','popBox');

						var el = document.createElement("iframe");
						el.setAttribute('id', 'ifrm');
						helpNode.appendChild(el);
						el.setAttribute('src', file_name);

            obj.appendChild(helpNode);
         }

function hideBox(id) {
   var node = document.getElementById('popBox'+id);
   node.parentNode.removeChild(node);
}
</script>
<style type="text/css">
   .popBox {
      position: absolute;
      z-index: 2;
      background: #cccccc;
      width: 600px;
      padding: 0.3em;
      border: 1px solid gray;
   }
   span {
      color: red;
      font-weight: bold;
   }

   iframe {
      border: none;
      width: 600px;
      height: 200px;
   }

</style>
</head>
<body>
      <div onmouseover="showBox('report_file.txt', 'file1', this)"
				onmouseout="hideBox('file1')"
style="cursor:pointer"><span>HOST 1</span><br/></div>


    <div onmouseover="showBox('report_file2.txt', 'file2', this)"
				onmouseout="hideBox('file2')"
style="cursor:pointer"><span>HOST 2</span><br/></div>

</body>
</html>

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Next Question:

what is the function of swap in linux why i have to create apsolutely a particion for the swap when i install (i installed lnx4win mandrake and made an automat. disk particion and the install program one of my disk partitions that was 3gb devidet in 4 one native 700mb swap 600mb and the others i... (1 Reply)
Discussion started by: user666
1 Replies

2. Linux

I have a question...

hello,I want to get a free linux(English).How to get it?? (2 Replies)
Discussion started by: Jerry_wang
2 Replies

3. UNIX for Dummies Questions & Answers

A question?

using my unix os, can i do any autoexec.bat editing in order to execute selected programs that i use most often? :confused: (1 Reply)
Discussion started by: alecks1975
1 Replies

4. UNIX for Dummies Questions & Answers

Question

I was given a computer that was wiped clean that has a unix system installed.I want to know how do I format the hardrive so I can install windows XP Professional (1 Reply)
Discussion started by: gemini61
1 Replies

5. Shell Programming and Scripting

question

how do i write a script that'll open what i entered and scan it for a certain line of text. for example, i enter a filename (that exists) and in that file i want to scan a certain word that'll show how much of that word appears throughout the file. (2 Replies)
Discussion started by: mrhenry
2 Replies

6. Shell Programming and Scripting

IF question

Hi there I'm new to bash and unix for that matters. Just started yesterday, having to do a script for work, outputting HTML from various system info's. And me having coded Rexx for years ... then this is a little different :-) My question is simple .... I have an IF that does not work - >... (9 Replies)
Discussion started by: Mettemusens
9 Replies

7. UNIX for Dummies Questions & Answers

Help me these Question??

1. How the Unix system identify the Other User to access for file permission? 2. What command we use to convert the extension of a file name? 3. What command use to convert other editing file to Unix based text file? Please answer of these Question???Its necessary for me?? (3 Replies)
Discussion started by: pradipta_pks
3 Replies

8. Shell Programming and Scripting

Question help

sorry wrong section. (0 Replies)
Discussion started by: Scripter12345
0 Replies
QDomElement(3qt)														  QDomElement(3qt)

NAME
QDomElement - Represents one element in the DOM tree SYNOPSIS
All the functions in this class are reentrant when Qt is built with thread support.</p> #include <qdom.h> Inherits QDomNode. Public Members QDomElement () QDomElement ( const QDomElement & x ) QDomElement & operator= ( const QDomElement & x ) ~QDomElement () QString attribute ( const QString & name, const QString & defValue = QString::null ) const void setAttribute ( const QString & name, const QString & value ) void setAttribute ( const QString & name, int value ) void setAttribute ( const QString & name, uint value ) void setAttribute ( const QString & name, long value ) void setAttribute ( const QString & name, ulong value ) void setAttribute ( const QString & name, double value ) void removeAttribute ( const QString & name ) QDomAttr attributeNode ( const QString & name ) QDomAttr setAttributeNode ( const QDomAttr & newAttr ) QDomAttr removeAttributeNode ( const QDomAttr & oldAttr ) virtual QDomNodeList elementsByTagName ( const QString & tagname ) const bool hasAttribute ( const QString & name ) const QString attributeNS ( const QString nsURI, const QString & localName, const QString & defValue ) const void setAttributeNS ( const QString nsURI, const QString & qName, const QString & value ) void setAttributeNS ( const QString nsURI, const QString & qName, int value ) void setAttributeNS ( const QString nsURI, const QString & qName, uint value ) void setAttributeNS ( const QString nsURI, const QString & qName, long value ) void setAttributeNS ( const QString nsURI, const QString & qName, ulong value ) void setAttributeNS ( const QString nsURI, const QString & qName, double value ) void removeAttributeNS ( const QString & nsURI, const QString & localName ) QDomAttr attributeNodeNS ( const QString & nsURI, const QString & localName ) QDomAttr setAttributeNodeNS ( const QDomAttr & newAttr ) virtual QDomNodeList elementsByTagNameNS ( const QString & nsURI, const QString & localName ) const bool hasAttributeNS ( const QString & nsURI, const QString & localName ) const QString tagName () const void setTagName ( const QString & name ) virtual QDomNamedNodeMap attributes () const virtual QDomNode::NodeType nodeType () const virtual bool isElement () const QString text () const DESCRIPTION
The QDomElement class represents one element in the DOM tree. Elements have a tagName() and zero or more attributes associated with them. The tag name can be changed with setTagName(). Element attributes are represented by QDomAttr objects that can be queried using the attribute() and attributeNode() functions. You can set attributes with the setAttribute() and setAttributeNode() functions. Attributes can be removed with removeAttribute(). There are namespace- aware equivalents to these functions, i.e. setAttributeNS(), setAttributeNodeNS() and removeAttributeNS(). If you want to access the text of a node use text(), e.g. QDomElement e = //... //... QString s = e.text() The text() function operates recursively to find the text (since not all elements contain text). If you want to find all the text in all of a node's children, iterate over the children looking for QDomText nodes, e.g. QString text; QDomElement element = doc.documentElement(); for( QDomNode n = element.firstChild(); !n.isNull(); n = n.nextSibling() ) { QDomText t = n.toText(); if ( !t.isNull() ) text += t.data(); } Note that we attempt to convert each node to a text node and use text() rather than using firstChild().toText().data() or n.toText().data() directly on the node, because the node may not be a text element. You can get a list of all the decendents of an element which have a specified tag name with elementsByTagName() or elementsByTagNameNS(). For further information about the Document Object Model see http://www.w3.org/TR/REC-DOM-Level-1/ and http://www.w3.org/TR/DOM- Level-2-Core/. For a more general introduction of the DOM implementation see the QDomDocument documentation. See also XML. MEMBER FUNCTION DOCUMENTATION
QDomElement::QDomElement () Constructs an empty element. Use the QDomDocument::createElement() function to construct elements with content. QDomElement::QDomElement ( const QDomElement & x ) Constructs a copy of x. The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode(). QDomElement::~QDomElement () Destroys the object and frees its resources. QString QDomElement::attribute ( const QString & name, const QString & defValue = QString::null ) const Returns the attribute called name. If the attribute does not exist defValue is returned. See also setAttribute(), attributeNode(), setAttributeNode(), and attributeNS(). QString QDomElement::attributeNS ( const QString nsURI, const QString & localName, const QString & defValue ) const Returns the attribute with the local name localName and the namespace URI nsURI. If the attribute does not exist defValue is returned. See also setAttributeNS(), attributeNodeNS(), setAttributeNodeNS(), and attribute(). QDomAttr QDomElement::attributeNode ( const QString & name ) Returns the QDomAttr object that corresponds to the attribute called name. If no such attribute exists a null attribute is returned. See also setAttributeNode(), attribute(), setAttribute(), and attributeNodeNS(). QDomAttr QDomElement::attributeNodeNS ( const QString & nsURI, const QString & localName ) Returns the QDomAttr object that corresponds to the attribute with the local name localName and the namespace URI nsURI. If no such attribute exists a null attribute is returned. See also setAttributeNode(), attribute(), and setAttribute(). QDomNamedNodeMap QDomElement::attributes () const [virtual] Returns a QDomNamedNodeMap containing all this element's attributes. See also attribute(), setAttribute(), attributeNode(), and setAttributeNode(). Reimplemented from QDomNode. QDomNodeList QDomElement::elementsByTagName ( const QString & tagname ) const [virtual] Returns a QDomNodeList containing all descendent elements of this element that are called tagname. The order they are in the node list is the order they are encountered in a preorder traversal of the element tree. See also elementsByTagNameNS() and QDomDocument::elementsByTagName(). QDomNodeList QDomElement::elementsByTagNameNS ( const QString & nsURI, const QString & localName ) const [virtual] Returns a QDomNodeList containing all the descendent elements of this element with the local name localName and the namespace URI nsURI. The order they are in the node list is the order they are encountered in a preorder traversal of the element tree. See also elementsByTagName() and QDomDocument::elementsByTagNameNS(). bool QDomElement::hasAttribute ( const QString & name ) const Returns TRUE if this element has an attribute called name; otherwise returns FALSE. bool QDomElement::hasAttributeNS ( const QString & nsURI, const QString & localName ) const Returns TRUE if this element has an attribute with the local name localName and the namespace URI nsURI; otherwise returns FALSE. bool QDomElement::isElement () const [virtual] Returns TRUE. Reimplemented from QDomNode. QDomNode::NodeType QDomElement::nodeType () const [virtual] Returns ElementNode. Reimplemented from QDomNode. QDomElement &; QDomElement::operator= ( const QDomElement & x ) Assigns x to this DOM element. The data of the copy is shared (shallow copy): modifying one node will also change the other. If you want to make a deep copy, use cloneNode(). void QDomElement::removeAttribute ( const QString & name ) Removes the attribute called name name from this element. See also setAttribute(), attribute(), and removeAttributeNS(). void QDomElement::removeAttributeNS ( const QString & nsURI, const QString & localName ) Removes the attribute with the local name localName and the namespace URI nsURI from this element. See also setAttributeNS(), attributeNS(), and removeAttribute(). QDomAttr QDomElement::removeAttributeNode ( const QDomAttr & oldAttr ) Removes the attribute oldAttr from the element and returns it. See also attributeNode() and setAttributeNode(). void QDomElement::setAttribute ( const QString & name, const QString & value ) Adds an attribute called name with value value. If an attribute with the same name exists, its value is replaced by value. See also attribute(), setAttributeNode(), and setAttributeNS(). void QDomElement::setAttribute ( const QString & name, int value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttribute ( const QString & name, uint value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttribute ( const QString & name, long value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttribute ( const QString & name, ulong value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttribute ( const QString & name, double value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttributeNS ( const QString nsURI, const QString & qName, const QString & value ) Adds an attribute with the qualified name qName and the namespace URI nsURI with the value value. If an attribute with the same local name and namespace URI exists, its prefix is replaced by the prefix of qName and its value is repaced by value. Although qName is the qualified name, the local name is used to decide if an existing attribute's value should be replaced. See also attributeNS(), setAttributeNodeNS(), and setAttribute(). void QDomElement::setAttributeNS ( const QString nsURI, const QString & qName, int value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttributeNS ( const QString nsURI, const QString & qName, uint value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttributeNS ( const QString nsURI, const QString & qName, long value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttributeNS ( const QString nsURI, const QString & qName, ulong value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. void QDomElement::setAttributeNS ( const QString nsURI, const QString & qName, double value ) This is an overloaded member function, provided for convenience. It behaves essentially like the above function. QDomAttr QDomElement::setAttributeNode ( const QDomAttr & newAttr ) Adds the attribute newAttr to this element. If the element has another attribute that has the same name as newAttr, this function replaces that attribute and returns it; otherwise the function returns a null attribute. See also attributeNode(), setAttribute(), and setAttributeNodeNS(). QDomAttr QDomElement::setAttributeNodeNS ( const QDomAttr & newAttr ) Adds the attribute newAttr to this element. If the element has another attribute that has the same local name and namespace URI as newAttr, this function replaces that attribute and returns it; otherwise the function returns a null attribute. See also attributeNodeNS(), setAttributeNS(), and setAttributeNode(). void QDomElement::setTagName ( const QString & name ) Sets this element's tag name to name. See also tagName(). QString QDomElement::tagName () const Returns the tag name of this element. For an XML element like this: <img src="myimg.png"> the tagname would return "img". See also setTagName(). QString QDomElement::text () const Returns the element's text or QString::null. Example: <h1>Hello <b>Qt</b> <![CDATA[<xml is cool>]]></h1> The function text() of the QDomElement for the <h1> tag, will return "Hello Qt <xml is cool>". Comments are ignored by this function. It only evaluates QDomText and QDomCDATASection objects. SEE ALSO
http://doc.trolltech.com/qdomelement.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qdomelement.3qt) and the Qt version (3.3.8). Trolltech AS 2 February 2007 QDomElement(3qt)
All times are GMT -4. The time now is 07:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy