dom

load several fragments at once with jquery .load()

i am loading some fragments with jquery with following code var box = $(this).closest(".product-contain").children(".title:first"); box.load(url + " .maintitle", data); var box = $(this).closest(".product-contain").children(".detail:first"); box.load(url + " .alldetail", data); (i don't want to load whole .product-contain at once, bec...

How to extract a node attribute from XML using PHP's DOM Parser

Hey, I've never really used the dom parser before and now I have a question. How would I go about extracting the url from this <files> <file path="http://www.thesite.com/download/eysjkss.zip" title="File Name" /> </files> Thanks ...

Approach to maintain updateable html content

What is better approach to update html content of some window on page: 1) I can use html template of that window, and when I need to change data described there I simply generate real html and replace old one with new. In this case I have to send from server side both html page with first data (for search engine; I can't fill this data ...

DOM envy. (I am using hidden inputs to store data, but there is so much data the page is slow)

I am passing 3 HashMaps that contain data pertaining to 13 different time periods, to a jsp page. The data from these maps is used to populate and alter a summary data div (that consists of the summed total of the different datasets, for the selected ranges, so it could 1 of 13, 2 of 13, all 13 and so on. However the 3 datasets are la...

Javascript/DOM: On a dynamically created form text object, how do you reference the value via DOM?

I have an array that looks like this: grades[0] = ["A", 4.0, 0, "a"]; grades[1] = ["A-", 3.67, 0, "a-minus"]; grades[2] = ["B+", 3.33, 0, "b-plus"]; grades[3] = ["B", 3.0, 0, "b"]; grades[4] = ["B-", 2.67, 0, "b-minus"]; grades[5] = ["C+", 2.33, 0, "c-plus"]; grades[6] = ["C", 2.0, 0, "c"]; grades[7] = ["C-", 1.67, 0, "c-minus"]; grades...

Most Efficient Way to Find Leftmost div?

Using jQuery or straight Javascript, I'm looking for the best way to find the leftmost div (or in general the DOM element with the minimum or maximum position on either axis). So far I have two solutions: Iterate through the div objects that I want to consider, saving the smallest left position found. Build an array of objects and us...

How can I use Javascript to get a list of all picture URLs available on a site?

I'm curious as to how DownThemAll does this. Do they use Javascript? How can I get a list of all of the urls in a website using Javascript? ...

Catching JQuery events for 2 images rendered in the same space.

I've got an html document that has 2 images rendered on top of each other. The second one is a small gear icon that is added in top right corner of the larger image with javascript. I've registered click event handlers in my script file for both images but when I click on the gear I get nothing. If i click a little to the left of the ...

Underline words on mouseover after X seconds

What I'm trying to do is: when you mouse over any word in a body of text say for two seconds, it will become underlined. And if you click it, it will stay underlined until you click anywhere else or you click it one more time. Any suggestions? ...

Need help with creating DOM elements on the fly with jQuery: jQuery(html, props) function

I'm trying to construct the following div element using jQuery: <div> <p>Hello</p> <p>Stack Overflow</p> </div> I added the first paragraph like this: $('<div/>', {html: $('<p/>', {text: "Hello"})}) but I don't know how could I add the second paragraph. Please help. ...

JavaScript: I have an array. I want to check if the first element is a fieldset.

OK, so here was my original problem. You don't have to read it but in case it helps: http://stackoverflow.com/questions/4001246/firefox-thinks-fieldset-is-a-form-element-chrome-doesnt Basically, Firefox and IE count the fieldset in my HTML as an element in my array, and that screws everything up. But Google Chrome does not count the fie...

Where can I find a good Javascript/DOM reference?

Possible Duplicate: Best reference sites for HTML and JavaScript programming What is the best online javascript/css/html/xhtml/dom reference? A good Javascript API reference documentation related to browsers and DOM Where can I find a good Javascript/DOM reference? I know the MSDN one: http://msdn.microsoft.com/en-us/librar...

How to serialize XML document in python using xml.dom library

I'd like to know how I can serialize an XML document in python specifically using the xml.dom library. ...

Is Python bad at XML?

EDIT The use of the phrase "bad at XML" in this question has been a point of contention, so I'd like to start out by providing a very clear definition of what I mean by this term in this context: if support for standard XML APIs is poor, and forces one to use a language-specific API, in which namespaces seem to be an afterthought, then ...

Dynamically Create Widgets in DOM

I'm using jQuery mobile 1 alpha 1. To create a text input for instance in jQuery mobile you add to your HTML <div data-role='fieldcontain'> <label for='name'>Text Input:</label> <input type='text' name='name' id='name' value='' /> </div> Supposing you assign the above HTML code to a variable $textinput and type $("#someid").append($...

Can I capture and save the current state of a webpage using javascript

I need to get the entire contents of a page with javascript and send it to a server script to save it. I want to do this after the user has made some changes to the page using AJAX and other javascript tools. I don't want the state of certain elements. I'd like to essentially get everything inside the body tag so I can pass it to a serve...

dom childNodes issue

I seem to be getting different results of fromDate between Mozilla and IE. Is there a more reliable cross-browser way of doing this? [edit] I am actually getting different column values! [/edit] <tr id='id3332201010241' /> <td>20101024</td> <td>20101025</td> <td>1415</td> <td>1445</td> <td>INVDROP</td> <td>H4T1A3</td> <td><a...

Handling Empty Nodes Using Java DOM

Hello everyone, I have a question concerning XML, Java's use of DOM, and empty nodes. I am currently working on a project wherein I take an XML descriptor file of abstract machines (for text parsing) and parse a series of input strings with them. The actual building and interpretation of these abstract machines is all done and working...

jQuery not detach()'ing if it contains an input tag

Hi there I have a table which i need to move elements up and down in. I have the code working, but as soon as I add a tag to it, it throws the error: Error: this.visualElement is undefined Source File: http://192.9.199.11:83/templates/admin/js/jquery/ui.checkbox.js Line: 94 The HTML looks like this: <table width="100%" cellpadding=...

Listen for changes in a DOM structure

Is there any standardized way (not language dependent, I need at least C++, Java and Ruby) of listening for changes in a DOM-document? I would like to have a function called every time a node's attributes change, a node gets renamed, deleted, etcetera. I found the Handlers for UserData, however those don't allow me to listen for e.g. ch...