dom

How to change title attribute in <a> tag using JavaScript?

Hi All: I have a html tag , in that initially I want tooltip name as mentioned in the "title" attribute. After I click on the link, I want different tooltip name. I have used the below code but it is not working. Can anyone please help me? <html> <head> <script> function tool(){ document.getElementsByName(link).title = "after click"; ...

Is getElementByClass safe to use across browsers like getElementById?

Is getElementByClass safe to use across browsers like getElementById? Update Currently using: window.opener.document.getElementById But I want to reference the object by classname (there will be only 1 element with that classname). ...

change html text from link with jquery

Hello, a simple question here Is there a way to change the text "click here" <a id="a_tbnotesverbergen" href="#nothing">click here</a> in this link Richard ...

reCaptcha values not appearing in $_POST

Hey everyone, I am trying to use reCaptcha on my site, and recaptcha_challenge_field, and recaptcha_response_field are not being added to the $_POST array on the backend - but the rest of the variables from my form are. Any ideas? I have double checked the public/private keys. Here is the generated HTML: <form action='myform.php' na...

image gallery loop JS

var thumbs = document.getElementsByTagName("img"); for (var i=0; i<thumbs.length; i++) { Core.addEventListener(thumbs[i], "click", function() {alert(i);}); } In the above code, the alert always shows18. that is the number of image thumbnails. i want it to show which thumbnail i clicked. why isnt it showing that? also i need to p...

Alternative to innerhtml that includes header?

I'm trying to extract data from the following page: http://www.bmreports.com/servlet/com.logica.neta.bwp_PanBMDataServlet?param1=&amp;param2=&amp;param3=&amp;param4=&amp;param5=2009-04-22&amp;param6=37# Which, conveniently and inefficiently enough, includes all the data embedded as a csv file in the header, set as a variable called gs_...

JQuery - animate moving DOM element to new parent?

I have an image tag inside of a table cell, that I'd love to move to another table cell, and have that movement animated. The code looks something like this... <td id="cell1"><img src="arrow.png" alt="Arrow"/></td> <td id="cell2"></td> I'd like to move "arrow.png" to "cell2", and have some kind of transition effect, preferably with J...

How to get the parent element in an HTML string at a given offset?

New Question I am looking for a way in Javascript to get the parent element of a given position in an HTML string (e.g. document.innerHTML or document.body.innerHTML). Simple example: <p>I really <em>like <a href="...">stackoverflow</a></em> a lot.</p> ^...........^ Off...

jQuery event for images loaded

Is it possible to detect when all images are loaded via a jQuery event? Ideally, there should be a $(document).idle(function() { } or $(document).contentLoaded(function() { } But I can't find such a thing. I thought of attaching an event like this: $(document).ready(function() { var imageTotal = $('img').length; var im...

Detect when resources loaded via ajax

I recently asked how to detect when all resources of a page have been loaded, such as images and stylesheets. The answer came back, use the $(window).load(); method in jQuery. My question now is how do I detect when content is done loading via AJAX. AJAX injects some img elements, say, into the DOM... how can I tell when those images ha...

jquery: getting elements from xml in different order

Hello, The xml response from the ajax request looks like this: <element type='type1' /> <element type='type2' /> ... <element type='type1' /> I want to insert dom elements based on the xml, but I want them to be ordered as: first all the elements of type1, then all the elements of type2. It made sense for me (and I also read some di...

dynamically changing position property in css file after d'n'd

hey guys, hope you can help me, again :) i want to build a little webbased gui designer. the user can switch into editor-mode and can place the components wherever (s)he wants via drag'n'drop. when (s)he switches back to user-mode i want the position-details in the external css-file to be updated via javascript. i looked into some examp...

Delphi "DOMVendor" Open XML and Xerces: known limitations?

Is it safe to use Open XML instead of MSXML as the DOM Vendor with Delphi's IXMLDocument interface? Are there known limitations in basic functionality which I should be aware of? And how do the Open XML and Xerces implementations differ? (Xerces needs additional libraries, while Open XML seems to be included in the executable iirc) ...

javascript server under XULRunner fails.

I'm trying to debug a DOM scraping packaged called crowbar. Anyhow, when I run I get: Error: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIServerSocket.asyncListen]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: chrome://crowbar/content/crowbar.js :: onLoad :: l...

Speed and XML Parsing in .NET - Serialization vs XML DOM vs ?

I have done XML parsing before but never on a massive scale. If I'm working with many documents similar to this format: <?xml version="1.0" ?> <items comment="something..."> <uid>6523453</uid> <uid>94593453</uid> </items> What is the fastest way to parse these documents? 1) XML DOM 2) XML Serialize - Rehydrate to a .NET Object 3) ...

How do I change the name of multiple selected html values?

I have about 20 check boxes. When the user selects these and then uses an alternate submit button, I need to change the name of the name/value pair, for the selected inputs. Why does this function only change the name of every other selected input? function sub_d() { for (i = 0; i < document.checks.OGname.length; i++) //for all ...

Unobtrusive javascript rendered

In the wikipedia entry Unobtrusive JavaScript there is an example of obtrusive JavaScript: <input type="text" name="date" onchange="validateDate(this);" /> The solution is the following: <input type="text" name="date" /> window.onload = function(){ //Wait for the page to load. var inputs = document.getElementsByTagName('input');...

Maintain reference to element after inserting into DOM

I've traditionally used JavaScript as "UI Glue", and have (regrettably) been one of those that looked at JS as a "toy". However, I've changed course and am finding some real power in its use - especially coupled with JSON/jQuery. My question involves dynamically creating elements, then appending them to the DOM. It seems that when thi...

JavaScript - Traversing the HTML DOM using childNodes causes errors in Non IE browsers

I have the following table being rendered in my browser. It's generated from the server side. <table id="tblQuestions" class="tblQuestionsContainer" border="0"> <tr> <td id="1" class="tdQuestion">Are u an indian citizen ?</td> </tr><tr> <td><table id="answer-1" border="0"> <tr> <td><input id="answer-1_0" type="radio" name="...

"Please wait" image on every user action with ASP.NET 3.5

Hello, In our ASP.NET 3.5 application, we would like to implement a "Please wait.." feature : on every user action (button click, tab change, etc.) we would display a little spinner on top of the page (actually in a separate frame that we use already have). We thought of this solution : "hijack" the _doPostBack to intercept every e...