dom

Which elements of an XHTML/HTML5 page should be explicitly included in the document outline?

The HTML5 spec definition of the "section" element is: The section element represents a generic document or application section. A section, in this context, is a thematic grouping of content, typically with a heading....Note: The section element is not a generic container element. When an element is needed for styling purposes or a...

How to groups table rows in html to manipulate them with jquery

I have an html table with many rows. I'm currently grouping several rows inside a div (I know this is ugly) and then show or hide the divs to show or hide the rows inside it. Is there a standard way to do this. Something like rowgroup or multiple tbody instead of this ugly div grouping? ...

Best practices on the clientside and the serveside with DOM scripting and PHP.

What it the best practices with for example Dom scripting on the client and serverside with php. What should you do with dom and what with php, can I skip installing php and do everything with dom as with php? ...

PHP: retrieve all declared namespaces of a DOMElement

I am using the DOM extension to parse an xml file containing xml namespaces. I would have thought that namespace declarations are treated just like any other attribute, but my tests seem to disagree. I have a document that starts like this: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/r...

Webbrowser control: auto fill textfields

I would like my custom browser to auto fill in a form when it is completely loaded Ok so inside private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { } Ive inserted the following statements webBrowser1.Document.GetElementById("FirstName").SetAttribute("value", "John"); webBrowser...

Dom Nodes manipulations, how remove tags which wrap my selection?

Hi, I try to explain you my "problem". I would like to know when I select a part of text, if this text is “wrapped” by html tags, and in function delete them. For example with this sentence : The car is <strong>green</strong>, and the boat is black If I select “green” and click on a button, I would like verify if green is wrapped by ...

Changing a php "echoed" div attribute with php

Hi everybody, I'm using PHP to echo a content stored on my database. The content is a DIV carrying any type of data. The problem is that I don't know the ID and I have some problems with these DIVs if I try to display them more that once. So, the idea is to modify the DIV id each time I'd like to display them. Something like this: <?...

typeof for html plugin elements

When using ECMAScripts typeof on plugin elements (i.e. embed or object), Safari & FireFox return "function": typeof(window.document['myPlugin']) // "function" This can't be influenced on the plugin side, as the browser doesn't call the plugin here. Funny enough, in IE the same line evaluates to "object". Is that simply implementation...

Can an embedded Flash object access the DOM of its parent document?

I'm just curious if it's possible that Flash objects can access the DOM of the document that has embedded it. ...

How to identify HTML elements (in javascript) in a browser agnostic fashion

Hi All, I need to identify all html elements on a page in a browser agnostic fashion. What I am basically doing is using mouse events to record clicks on the page. I need to record which element was clicked. So I add a mouse down listener to the document.body element. And on mouse down I get the element under the mouse. Lets say it...

dynamically added radio buttons onclick event not working ?

I am trying following, 1. Get response using Ajax from the users selection which returns me the list of the radio buttons attributes as 2. Once i get the attribute list i am creating the radio buttons using createElement() 3. Then i am attaching the event to the radio button for onclick buttons. 4. Then i add element to the DOM using...

Bypassing Javascript form handler

We are writing an ASP.NET MVC application. By default, if the client browser has Javascript, the handler for every form on the page is set, by Javascript, to be one that sends the submission down an Ajax "pipe" (progressive enhancement). But, for one form (on a page of several), I'd like this handler to be bypassed/ignored. Is there a s...

Show/hide glossary page in YUI

Hello All, I am trying to develop a toggle function like http://www.lutsr.nl/yui/toggle/ But it works a little different as them. When user enters the glossary page, he sees a full list of Alphabet with all the techical terms explaination All — A | B | C | E | G | H | M | P | Q | R | S | T | U | Z | Acti...

Use javascript to extend a DOM Range to cover partially selected nodes

I'm working on a rich text editor like web application, basically a XML editor written in javascript. My javascript code needs to wrap a selection of nodes from the contentEditable div container. I'm using the methods described at MDC. But since I need to synchronize the div containers content to my XML DOM I would like to avoid partial...

PHP Dom not retriving element

Hey I have this code: $code = ' <h1>Galeria </h1> <div class="galeria"> <ul id="galeria_list"> <li> <img src="img.jpg" width="350" height="350" /> <br /> Teste </li> </ul> </div>'; $dom = new DOMDocument; $dom->validateOnParse = true; $dom->loadHTML($code); var_dump($dom->getE...

catching an event in VBScript

Hi, guys. This is a VBS script that opens google, fills a form, and clicks a search button. set ie = CreateObject("InternetExplorer.Application") ie.navigate("www.google.com") ie.visible = true while ie.readystate <> 4 wscript.sleep 100 WEnd set fields = ie.document.getelementsbyname("q") set buttons = ie.document.getelementsbyn...

Javascript Expression "document.body.getElementsByTagName();" Vs "document.getElementsByTagName();"

Dear experts, I am quite new to javascript and I often see coders use those lines interchangeabaly. document.body.getElementsByTagName(); and document.getElementsByTagName(); What is the difference, benefits? Does this have anything to do with FF and IE? ...

How to get around the event bubble using jQuery's: .live()

Hi there. Here is the code in question: $(".navItems>ul>li").live('click', function() { var selectorID = $(this).attr('id'); $(".infoList").slideUp('fast', function(){ switchTabInfo(selectorID); }); function switchTabInfo(selectorID){ var actionID = selectorID.substring(4); actionID = "#" + actionID; $(actionID)...

Is there some algorithm to compare the DOM similarity of different pages ?

Has anyone some experience about this? ...

Way to get amount of colliding elements?

Is there a (simple) way to return the amount of elements colliding with a single element? Perhaps with jQuery? ...