dom

Move image data from AS3 to DOM

Can I load something using AS3/SWF and then create a DOM element using javascript to display the loaded data, without having the browser to load the same data twice? ...

Javascript appendChild() call not working in IE

Could someone explain why this piece of script won't work in IE? It seems to work alright in Firefox. I'm new with the appendChild() API. <html> <head> <script type='text/javascript'> function makeTable() { nTable=document.createElement('table'); nTable.setAttribute('id','myTable'); nTable.setAttribute('border','1'); nRow1...

JavaScript, DOM blur/focus, dropdowns

I am building a rich text/wysiwyg editor component in HTML and JavaScript. I have an unordered list of toolbar items which contains an image input element for a colour picker. The colour picker is an overlay which is displayed on the click event of the input element. The problem: I want the colour picker overlay to hide when focus is l...

Clear all script-set variables easily (Javascript/jQuery).

I'm trying to find a simple way to reset all current variables in the DOM. My app has a 'locked' state, but currently, when locked, the last set of information is still visible in the DOM if you look using Firebug for example. I know all the names of all variables, but I don't want to have a really cumbersome script including all of the...

firefox view source code

I noticed that the source code shown in Firefox appears to be incomplete. I have the latest version. When using the Firebug plugin to look at a webpage, I am able to find elements which are simply not recognized by Firefox. This is for a automated script I am working on. I am wondering several things: Why is a firefox plugin able to...

jQuery navigating the dom with Each and Nth Child.

I'm trying to navigate through each of the tr element and select the 5th td element then store the value in it. What am I doing wrong? $("table tbody tr td tbody tr:nth-child(4)").each(function (i) { alert(this.text); }); <table> <tbody> <tr> <td align="center"><table cellpadding="2" style="border: 2px solid rgb(208, 208, 208)...

An other way to load a js file in js code

I opened a javaScript file in a javaScript time.... document.write("<script src='newnote.js' type='text/javascript'></script>"); is there an other way to load the js in js code..? (this file is for loading a popup menu js code , which is loaded after delay by clock js code ... so i want an othe way to loaded it) ...

how to convert the webpage to xml document using java?

The assumption is the webpage is coded with correct tags. How can I Convert it to the XML file? I think the most webpages can be viewed as dom tree...How can I convert it to XML file? ...

Firefox Live DOM

Is it possible through a plugin or setting or something to allow Firefox to recognize the live DOM source code? Basically, firebug or other similar tools can recognize elements on the page which Firefox does not. I understand with these extensions I have the ability to see such changes made by javascript, but Firefox does not seem to f...

What is the difference between .empty().append() and .html() in jQuery?

Using jQuery, what's the performance difference between using: $('#somDiv').empty().append('text To Insert') and $('#somDiv').html('text To Insert') ? ...

Is there a performance difference between 'append' vs 'html'?

Possible Duplicate: What is the difference between .empty().append() and .html() in jQuery? Using jQuery, is there a difference in performance between: $('#somDiv').empty().append('text To Insert') and $('#somDiv').html('text To Insert') ? Also, does one method parse the input as a DOM object before the insert vs simply ...

jquery not updating DOM after $.getJSON in IE/Internet Explorer

I have a page that contains an element, <displayedimage>, that is not getting updated using jquery's document.ready/$.getJSON funcitonality in IE 6 and IE 8 (probably IE 7 too even though I haven't tested). This same piece of funcitonality works fine on XP Safari and OS X Safari, OS X Chrome, OS X Opera, etc. So, here's what happens: I ...

From Sax to Dom with DTD (python)

I need a validated DomTree with DTD (to use getElementById). Validating and Parsing works, but the dom does't work properly: from xml.dom import minidom from xml.dom.pulldom import SAX2DOM from lxml import etree import lxml.sax from StringIO import StringIO data_string = """\ <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE foo [ <!EL...

Parsing xml file in python

I have an XML file in the following format: <doc> <id name="X"> <type name="A"> <min val="100" id="80"/> <max val="200" id="90"/> </type> <type name="B"> <min val="100" id="20"/> <max val="20" id="90"/> </type> </id> <type...> </type> </doc> I would like to parse this document and build a hash table {X: ...

DOM and LINQ Difference

DOM and LINQ both are in-memory pattern. Apart from deferred execution,what is the difference between DOM and LINQ? ...

jQuery: text() vs html() ?

Using jQuery, what the difference between: $("#div").html('<a href="example.html">Link</a><b>hello</b>'); vs $("#div").text('<a href="example.html">Link</a><b>hello</b>'); ...

In VB how can I use a website url to create an HtmlDocument object that contains all the html from that webpage?

I was trying to use HtmlDocument and a given url to pull in the html contents of a website to use. However there is no constructor for HtmlDocument and it's Url property is readonly. Is there any way to create an object that contains the entire DOM for a given url? Thanks, Matt ...

Replace text (change case) in a textbox using Javascript

I am trying to build a sort of intelli-sense text input box, where as the user types, the 'and' is replaced by 'AND \n' (i.e. on each 'and', the 'and' is capitalized and user goes to new line). The Javascript I used for this is: function Validate() { document.getElementById("search").value = document.getElementById("search").value.r...

What's wrong with adding properties to DOM Element objects?

I've been looking for a straight answer for this (I can think of lots of possiblities, but I'd like to know the true reason): jQuery provides a .data() method for associating data with DOM Element objects. What makes this necessary? Is there a problem adding properties (or methods) directly to DOM Element Objects? What is it? ...

Can I get the full HTML represenation of an HTMLElment DOM object?

Hi, I'm using jquery to parse some HTML, something like: $(html).contents().each(function(){ var element = this.tagName; ... I can access the tagName, children, parent... using the DOM or the more friendly jQuery functions. But at one point a need the whole HTML of the current element (not what innerHTML or .html() return) and I...