dom

Inline jQuery script not working within AJAX call

Hi. I have a issue: while i call a inline script (wich uses jQuery too) from another page with ajax - it seems, that jQuery is no more defined (?), and I cannot use any of jQuery functions, that should be applied (according to inline script) to content. It's basically a news list, which holds links to particular news items. I prefer us...

VB 2008 - change icon of generated exe

I'm generating an executable file with VB 2008 using codeDom Compiler is there a way to change the icon before the compiler creates the exe file ? thanks ...

How can I get a jquery slideshow plugin that will change multiple divs?

I'm new to jquery, and I have a bit of a problem. What I need to do is have one div as my main slideshow. That seems straightforward enough. However, I would like another slideshow div to change next, ( containing a bit of text ). So the change path would be: div 1 change, div 2 change, div 1 change ,div 2 change, And so on. Whe...

Context-based getElementById is 1000 time slower than native getElementById. Do selector engines like sizzle use a cleverer strategy ?

Being interested in building html chunks off-dom before to insert them in the dom, I have done some testing using dynatrace. I used bobince's method : http://stackoverflow.com/questions/1643349/is-there-any-way-to-find-an-element-in-a-documentfragment/1643512#1643512 I found it to be almost 1000 time slower (in IE7), which surprised me ...

How can I calculate the position of a DOM element from Google Chrome content scripts.

Hi, I am writing a chrome extension and from the content script I want to calculate the absolute position of a DOM element. But from within content script, if i try to access offsetHeight, offsetWidth, offsetTop, offsetParent, etc, I get null. I guess content scripts don't have access to those DOM properties. Is there a way/workaround, ...

Can I scatter divs around a page randomly using only HTML and CSS?

i want to have a box in the centre of a page and several boxes scattered around, with different sizes, random positions, and no overlap. I think this is not possible to do with just html and css, and javascript/html DOM is needed. Have you seen examples of this? Do you have any tip or piece of code that can be helpful? Dont mind if it ...

Help interpret/implement "Copy/Paste from Excel to a web page" answer?

Can I get some help interpreting / implementing the answers at: http://stackoverflow.com/questions/2006468/copy-paste-from-excel-to-a-web-page/2006789 please? This was the most useful answer Google found for "Paste Excel to Web Page/Form" -- seems perfect but I can't get to work. (Requirement is to give users an option to pre-populate ...

PHP super fast xml updates required

Hi there, i run a system which needs to update various xml files from data stored in a db. The script runs via a server side php file which is monitored by a daemon so that it executes, finishes to free resources, then is restarted. I have some benchmarking within the script, and when i have to update 100 xml files, its taking about 15...

Best tool for DOM manipulation ?

I'm working on a web scraper which will aggregate data from various websites. I've started using PHP's built in DOM functions but after running into a couple of issues (especially regarding malformed markup and character encoding), I've chosen to ditch PHP. I was thinking of server side Javascript but am open to other suggestions. If I g...

Generate HTML source code from IE DOM

Is there any way to generate HTML source code from live DOM tree in IE? The DOM may be modified by JavaScript, but I just want the final result. If I want to write a BHO to do this, which event should I handle such thing? ...

Why can't I add a <br /> with JQuery .html?

Why does this code work: $('div.error_container').html('<div class="error">No more foo allowed</div>'); But this code causes an error: $('div.error_container').html('<div class="error">No more foo allowed<br /></div>'); I've tried putting the <br /> before and after the </div> tag, same error. I've treid changing it from <br /> to...

What is the fastest way of replacing DOM element(jQuery)?

My application is a real-time apps using ajax environment. It is a live picking of schedule. The users want see the available slot in real-time way. such that they can see other ticking schedule. And i'm using ajax to replace the element with the new one. Example: $.get(my_url, function(data){ $('#area').innerHTML(data); }); On succ...

Prototype Event.observe not seeing AJAX-returned HTML

I'm trying to create a CMS system based on AJAX using Prototype's library. On a page load, I have HTML, page title and additional Javascript for the page returned via JSON, and I update the HTML on the main area. I also have an event listener that listens for certain ID's to be clicked on. The listener is working, var TabMenu = { sel...

jQuery - onPage search like a browser

I try to make onpage searches like in modern browsers with STRG + F. I tried: $("#mydiv").find(':contains(\'mySearchString\')').prepend('found you!'); The problem is that jQuery adds found you multiple times, bedause there are multipile elements who has the string. Example: Found you<div> Found you<ul> Found you<li> ...

Detecting DOM Ready State Within an iFrame (jQuery)

I have a script being run in a document that may or may not be nested in an iframe. I have sorted out the issue of detecting the nested, but I can't figure out how to detect the ready state of the DOM when it is an iframe. Here is what I have already: if (window.self !== window.top) { // is nested // DOM ready test here ...

Not knowing how to position the output of Javascript in an HTML page

Hi folks, I am a javascript beginner . I am working on a wordsmith game that display's a clue (on the roll of a dice ) to a word . now i need to display the blank spaces of the word and a clue below it . I am not knowing hot to display the content to the place i want in the page ??? <html> <head> <script type="text/javascript"> form1= ...

Saving the manipulated DOM/HTML after editing it with Firebug

Assume that I've fired up Firefox with Firebug enabled on a random site (say slashdot.org). After loading the site I start editing the page using the Firebug > HTML panel. So far so good: my changes are immediately visible in Firefox. My questions: How do I save the edited DOM tree (represented as HTML)? How do I load a previously man...

performing jQuery show/hide on dynamically created content

I have a page I created with jQuery, and in this page is a table where the table rows have classnames that identify them as a certain color (i.e. tr class="yellowclass"). The user is able to filter rows by clicking a checkbox that will show/hide tables of a certain color. My problem is that the table is generated on the fly via getJS...

javascript restricting???

is it possible to restrict javascript libraries from being able to manipulate the dom? im trying to create a system that has a main system with the api which will be able to manipulate the dom and then i want to give the ability to create third party scripts but have them limited to only the api functions. ...

Are an element's dimensions readable immediately upon adding it to the DOM tree?

Suppose I dynamically create a DIV using document.createElement, add some inner text, and want to determine its height and width. I can see that before adding the DIV to the DOM tree, properties such as offsetWidth and offsetHeight are 0, which is expected. Once it is programmatically added to the tree, can I expect those properties to...