Is there a capture the on load event when dynamically adding a script tag with JavaScript in IE?
The code below works in FireFox and Chrome but not in IE.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head r...
I want to parse the CSS files that are loaded with an HTML page but I don’t want to make AJAX calls to reload the CSS files that have already been loaded. Is there any way to access the pages unparsed CSS text?
For example, it would allow one to access -moz-* declarations in Safari.
...
By first line of Javascript I meant the JS code inside tags with no "src" attribute.
...
Hi,
I want to change the method DomElement.appendChild() to work differently when applied on an Object that I have created:
// using MooTools;
var domElement = new Class({...});
var MyObject = new domElement(...);
$(document).appendChild(MyObject); // Error
// I want to add to (extend) appendChild, to do something specific, when:
al...
Hi,
I need to sort an XML by tag names and attribute.
Is it possible using DOM?
I need the result in a sorted XML file not HTML.
for example:
<books>
<book id='1'>
<name value='N1'/>
<author value='A1'/>
</book>
<book id='3'>
<name value='N3'/>
<author value='A3'/>
</book>
<book id='2'>
<author value='A2'/>
<name val...
Hi everyone,
I have a treeview with drag and drop functionality. Upon completion of drag and drop I need to find the count of the child nodes of the new parent node. So for that I'm using the following
lines
var childnodelength=elem.parentNode.parentNode.childNodes.length;
alert(childnodelength);
But I always get the same value of ...
(Note: This question is for an internal-use-only project, so some of the usual security concerns don't apply.)
I'm trying to find some way to insert HTML/Javascript into a pre-existing IE7 browser window. Basically, we are using a web-based support ticket system, and I am inserting code into the page to add links and lists and such, to ...
I'm trying to parse some HTML with DOM in PHP, but I'm having some problems. First, in case this change the solution, the HTML that I have is not a full page, rather, it's only part of it.
<!-- This is the HTML that I have --><a href='/games/'>
<div id='game'>
<img src='http://images.example.com/games.gif' width='300' height='137' borde...
How to select a div using it's ID but with a widcard?
If the DIV's ID is statusMessage_1098, I would like to select it in some way like document.getElementById('statusMessage_*').
This is because until the page is generated, I don't know the suffix of the ID and only one such ID will be present in a page. Is this possible?
Thanks for ...
I am trying to write an extension for Google Chrome. I want to capture any keyboard input on a given page, and do something magic to it. I am able to do most of what I need with these lines:
document.addEventListener("keydown", function(event) { OnKeyDown(event); }, false);
document.addEventListener("keyup", function(event) { OnKeyDow...
I have a two columns of checkboxes with predictable names. How can I disable a checkbox in column B when the ones in column a is unchecked and only enable it when the first the checkbox a is enabled?
<dmf:checkbox
name="someNameAColumnNumber"
value="true"
onclick = "enableColumnBCheckBox" runatclient="true"
/>
Is there somethi...
I would like an event handler to fire whenever someone clicks anywhere on a window (so I can clear away a menu if they click someplace other than the menu). The following works in Safari:
function checkwho(ev) {
obj=(window.external) ? event.srcElement : ev.target;
var type=obj.nodeName;
if ((type == 'BODY') || (typ...
I'm trying to use the GoogleMaps javascript library from inside of SpiderMonkey using the pythong wrapper, but I can't because of the lack of a DOM.
Is there some way I can integrate a DOM into this so that I can get this to work?
...
How do I go about removing an individual dynamically created text node?
I am generating input's on the fly and am using .createTextNode to place descriptive text before the elements. I need the ability to delete specific elements that are being created and am using .removeChild to do it. That works fine for removing an individual inp...
i use jquery elastic plugin for expanding a textbox. it works great but i want to use this on a textbox that is added to the DOM with ajax but unfortunately this plugin has no live built-in function.
is there a way to solve this?
http://www.unwrongest.com/projects/elastic/
...
I have the following code, written using jQuery:
var strval = '22'
$("#quicknote").attr("href",
"javascript:location.href=/'http://site.com/notes/add?projects=/'+ strval")
Which results in the following attribute:
<a href="javascript:location.href='http://site.com/notes/add?projects='+'strval'"
id="quicknote">
But, what I wan...
I've got some links that I want to select class and id at the same time.
This is because I've got 2 different behaviours. When a class of links got one class name they behave in one way, when the same clas of links got another class name they behave differently. The class names are switch with jquery.
So I have to be able to select a l...
Do you know any tool that takes a CSS stylesheet and a bunch of HTML files and then is able to identify CSS rules on the DOM and rewrite them according to the optimal element DOM path?
Example HTML snippet:
<div id="container">
<div class="profile">
<img class="thumb" src="xxx" />
<span class="nickname">knoopx</span>
</div>
</div...
Is there any way to include the user agent string along with the request send by PHP Simple HTML DOM Parser?
...
Hi,
document.getElementById doesn't seem to work across all browsers (I mean some old ones) and I am sure there are developers who are not aware of this.
What solutions would you suggest to make it cross-browser?
Thanks
...