dom

garbage collection of jquery.html

i was wondering if the following code would cause some problems like memory leak <html> <head> <script type='text/javascript' src='jquery-1.4.2.js'> </script> <script type="text/javascript"> function a(){ for(var i = 0; i < 50000; i++){ $("#d").html("<span>" + i + "</span>"); } ...

GWT List Grid: Improve DOM element cration performance

Hi, I have a List grid where elements are being added dynamically after fetching from server. But to add each element in the grid it takes around 40mili seconds, which is too slow. To add 300 elements it takes around 10/12 seconds in Firefox(3.6) and IE(8), but opera does it faster. Please help me. Thanks, Kisor ...

PHP DOM array - cut the first element - better way to do it

Dear friends ! I'm really stucked and don't know how to implement an idea better. So, we have an XML file: I've got an array by function dom_to_array() function dom2array($node) {$result = array(); if($node->nodeType == XML_TEXT_NODE) { $result = $node->nodeValue; } else { if($node->hasAttributes()) { $attribut...

Parsing document with python minidom

I have the following XML document that I have to parse using python's minidom: <?xml version="1.0" encoding="UTF-8"?> <root> <bash-function activated="True"> <name>lsal</name> <description>List directory content (-al)</description> <code>ls -al</code> </bash-function> <bash-function activated="True"...

Font shadows using Raphaël—JavaScript Library

I would like to put a shadow around any given text, or make the text more anti-aliased looking. For example lets say I'm running a simple text such as: var titleName = R.text(x+200, y-75, "Lorem Ipsoup de jour") .attr({font: '75px Helvetica, Arial', opacity: 1, fill: "#dfe6ec"}) The text is somewhat chunky looking at...

Prevent firebug from manipulating DOM

Is there a way to prevent programs like Firebug from manipulating the DOM of a page. I've noticed that you can simply delete thing like ads that are paid for by other companies. Is there a way for the page to stop it? ...

javascript setAttribute 'className' works onLoad, but not onClick

Why does the following work for onLoad, and not onClick, and what would be the solution? Thanks in advance... <head> <title>Untitled Page</title> <LINK href=CSS/showdetails.css type=text/css rel=stylesheet /> </head> <body OnLoad="javascript:showdetails()"> <script language=JavaScript src=js/showdetails.js type=text/javascript>...

Jquery select all elements with an innerHTML that starts with a string?

I know you can use :contains to get elements who's innerHTML contains a certain string, but how can I get the elements whos innerHTML starts with a string? ...

Intercept access to DOM by JavaScript

Hi, I wanted to know how do I intercept a DOM access by a JavaScript. Are there any tools or whitepapers available on this ? (Else I will need to write one!) The idea behind the interception is something to do with a security module for web browsers. Thanks. ...

Will unsupported selectors for CSS work when used inside jQuery?

There are several CSS selectors that are not supported by IE6 example: > (Child selector) + (Selects an element that is a next sibling of another element.) [attr] selector :first-child Does this impact the functioning of jQuery? i.e. if you use eg : $("div > a").css("",""); Will it cause problems in IE6 or will it work...

retain html div elements after updatepanel update in asp.net....

I use jquery facebox as delete confirmation box. When i do a delete it removes my record and i show the resultsdiv via javascript. But it always shows Error: document.getElementById("ImageButtonDiv") is null here is my code, protected void Delete_Click(object sender, EventArgs e) { // my delete ScriptManager.RegisterClientScri...

Checking inside of the div tag with innerhtml in javascript?

hi fellows im trying to make a registration form with ajax validation check. validation check is OK. i make it show a cross.png image when there is a problem about a field on the form. but what i wanna do next is to not let visitors apply the registration form when there is problem. i tried to check for errors by if(document.getElemen...

jquery click event

I have some jquery that looks like this, $('.career_select .selectitems').click(function(){ var selectedCareer = $(this).attr('title'); $.ajax({ type: 'POST', url: '/roadmap/step_two', data: 'career_choice='+selectedCareer+"&ajax=true&submit_career=Next", success: function(html){ ...

Emulate W3C event capturing model in IE

Is it possible to emulate event capturing in Internet Explorer? An example: <a>one</a> <a>two</a> <a>three3</a> <script> var links = document.getElementsByTagName("A"); for (var i=0; i < links.length; i++) { links[i].onclick = function(){ alert("clicked"); }; } </script> I want to prevent all these click events from firing. ...

PHP - Fatal error: Call to a member function getNamedItem() on a non-object in...

Ever seen that error? Yeah? Cause i've been sitting here for over 3 hours now trying to figure out why it's there. :( The URL passed in is correct, and the iframe on the page does exist. $doc = new DOMDocument(); @$doc->load($url); $lst = $doc->getElementsByTagName('iframe'); $iframe = $lst->item(0); $returnLinks[] = $iframe->attribute...

How can I modify pasted text?

Is it possible to intercept and modify text that gets pasted into a textarea? If intercepting isn't possible, can I modify it after being pasted? (Without modifying the already present text in the textarea.) ...

Is there a way to generate a CSS selector based on a DOM element in jQuery

Is there a way to take a DOM object and infer a CSS selector that could be used to find that element at a later time. Example: <ul class="items"> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> </ul> <script type="text/javascript"> var second = $('.items li:eq(1)'); console.log(get_css_selector(second)); </script> Where ...

Urgent problem with loading remote xml file

hello .. i'm trying to load remote xml file using php .. this is the function : $doc = new DOMDocument(); $doc->load($this->xml_file); $file = $doc->getElementsByTagName('file'); $totalFiles = $file->length; echo $totalFiles; and the remote xml file link is : http://localhost/script/index.php?act=xml which this ...

get element id that was involved in triggering an event

I have searched google but it seems no one has come across this issue. I have an keypress event set on a form. I am disabling the enter key(until all required fields are filled in) and trying to enable the + key to be used to move to the next available input area on the form. My form is highly dynamic other than the couple required fie...

Calls to update DOM are ignored in Phonegap app with iPhone 3G running iOS 3.0

I am using phonegap/jquery/jqtouch to develop an iPhone app. When testing the app with an iPhone 3G running iOS 3.0.1, jquery calls that make changes to the DOM (such as 'append()') do not work consistently. I have an alert call right before a call to 'append' and have another alert call right after the call to 'append'. Both alerts w...